Skip to content

Instantly share code, notes, and snippets.

@Prinzhorn
Created January 26, 2012 22:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Prinzhorn/1685648 to your computer and use it in GitHub Desktop.
Save Prinzhorn/1685648 to your computer and use it in GitHub Desktop.
Use jQuery.animate to animate over multiple elements
;(function($) {
$.fn.popIn = function(dur) {
var $all = this;
$('<b>').animate({
foobar: $all.length
}, {
easing: 'easeInOutBounce',
duration: dur,
step: function(now, fx) {
$all.hide().slice(0, now | 0).show();
}
});
};
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment