Created
December 26, 2012 16:02
-
-
Save bluerabbit/4381079 to your computer and use it in GitHub Desktop.
一行づつゆっくり順にli spanを表示していくアニメーションをfor文で実行できるように
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function animationPipe(queue, element) { | |
return $.when(queue).pipe(function(){ | |
return $(element).fadeIn(800); | |
}); | |
}; | |
var spanList = $('li span').hide(); | |
var queue = $.Deferred().resolve(); | |
for (var i = 0; i < spanList.length; i++) { | |
queue = animationPipe(queue, spanList.get(i)); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
点滅させる blink
http://jsfiddle.net/LEZmx/4/