1(function ( $ ) { 2 3 $.fn.bjlTicker = function() { 4 5 var self = this[0]; 6 7 var TICKER_CONTENT = self.innerHTML; 8 var TICKER_RIGHTTOLEFT = false; 9 var TICKER_DELAY = 40; 10 var TICKER_PAUSED = false; 11 12 ticker_start(); 13 14 function ticker_start() { 15 self.innerHTML = "<TABLE cellspacing='0' cellpadding='0' width='100%'><TR><TD nowrap='nowrap'>" 16 + "<SPAN class='ticker-body'> </SPAN>" 17 + "</TD></TR></TABLE>"; 18 19 $(self).find(".ticker-body").html(TICKER_CONTENT); 20 self.scrollLeft = 0; 21 self.style.display = "block"; 22 TICKER_tick(); 23 } 24 25 function TICKER_tick() { 26 if (!TICKER_PAUSED) 27 self.scrollLeft += 2 * (TICKER_RIGHTTOLEFT ? -1 28 : 1); 29 if (TICKER_RIGHTTOLEFT && self.scrollLeft <= 0) 30 self.scrollLeft = self.scrollWidth 31 - self.offsetWidth; 32 33 if (!TICKER_RIGHTTOLEFT 34 && self.scrollLeft >= self.scrollWidth 35 - self.offsetWidth) 36 self.scrollLeft = 0; 37 window.setTimeout(TICKER_tick, TICKER_DELAY); 38 } 39 40 // Handle hover activity 41 $(self).hover(function() { 42 TICKER_DELAY = TICKER_DELAY * 2; 43 }, function() { 44 TICKER_DELAY = TICKER_DELAY / 2; 45 }); 46 // Handle demo links 47// $("#toggle").click(function() { 48// TICKER_RIGHTTOLEFT = !TICKER_RIGHTTOLEFT; 49// }); 50// $("#pause").click(function() { 51// TICKER_PAUSED = !TICKER_PAUSED; 52// }); 53 54 return this; 55 }; 56 57 58}( jQuery )); 59 60
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.