Snippets → jQuery
Fade all elements in selection one by one
http://jsfiddle.net/elclanrs/9Zxew/9/
$elements.fade1by1();
(function ($) {
$.fn.fade1by1 = function (options) {
var opt = $.extend({
'delay' : 500,
'speed' : 500,
'ease' : 'linear'
}, options);
var that = this;
for (var i = 0, d = 0, l = that.length; i < l; i++, d += opt.delay) {
that.eq(i).delay(d).fadeIn(opt.speed, opt.ease);
}
};
})(jQuery);
Good code snippet… love this jQuery fading effect.