1/* List Ticker by Alex Fish 2// www.alexefish.com 3// 4// options: 5// 6// effect: fade/slide 7// speed: milliseconds 8*/ 9 10(function($){ 11 $.fn.list_ticker = function(options){ 12 13 var defaults = { 14 speed:4000, 15 effect:'slide' 16 }; 17 18 var options = $.extend(defaults, options); 19 20 return this.each(function(){ 21 22 var obj = $(this); 23 var list = obj.children(); 24 list.not(':first').hide(); 25 26 setInterval(function(){ 27 28 list = obj.children(); 29 list.not(':first').hide(); 30 31 var first_li = list.eq(0) 32 var second_li = list.eq(1) 33 34 if(options.effect == 'slide'){ 35 first_li.slideUp(); 36 second_li.slideDown(function(){ 37 first_li.remove().appendTo(obj); 38 }); 39 } else if(options.effect == 'fade'){ 40 first_li.fadeOut(function(){ 41 second_li.fadeIn(); 42 first_li.remove().appendTo(obj); 43 }); 44 } 45 }, options.speed) 46 }); 47 }; 48})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.