Want more features on Pastebin? Sign Up, it's FREE!
Guest

jQuery Sequence Fade

By: a guest on Jan 22nd, 2013  |  syntax: JavaScript  |  size: 0.41 KB  |  views: 62  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. (function ($) {
  2.  
  3.         // settings
  4.         var sequenceObjects = '.sequence'; // Class that should be sequenced
  5.         var sequenceDelay = 300; // Delay inbetween
  6.         var sequenceFadeDuration = 350; // Fade duration for each item
  7.  
  8.         jQuery.fn.sequenceFade = function() {
  9.                 delay = 0;
  10.                 return this.each(function() {
  11.                         $(this).delay(delay).fadeIn(sequenceFadeDuration);
  12.                         delay += sequenceDelay;
  13.                 });
  14.         };
  15.        
  16.        
  17. })(jQuery);
clone this paste RAW Paste Data