Skip to content

Instantly share code, notes, and snippets.

@bluerabbit
Created December 26, 2012 16:02
Show Gist options
  • Save bluerabbit/4381079 to your computer and use it in GitHub Desktop.
Save bluerabbit/4381079 to your computer and use it in GitHub Desktop.
一行づつゆっくり順にli spanを表示していくアニメーションをfor文で実行できるように
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));
}
@bluerabbit
Copy link
Author

@bluerabbit
Copy link
Author

@bluerabbit
Copy link
Author

点滅させる blink
http://jsfiddle.net/LEZmx/4/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment