1var timer = null; 2 3ticker = {}; 4ticker.totalList = 0; 5ticker.numList = 0; 6ticker.time = 800; 7ticker.interval = 3800; 8 9$(function() { 10 if ($('#div_ticker').length != 0) { 11 // ãã¼ã¸èªã¿è¾¼ã¿å¾ 12 ticker.totalList = $('#news-list li').length; 13 ticker.width = $('#div_ticker').css('width'); 14 ticker.height = $('#div_ticker').css('height'); 15 var str = $('#news-list li:first').html(); 16 $('#div_ticker').html(str); 17 _interval.start(); 18 19 // ã¦ã£ã³ãã¦ãããã©ã¼ã«ã¹ãå¤ããã忢 20 $(window).focus(function() { 21 _interval.start(); 22 }).blur(function() { 23 _interval.stop(); 24 }); 25 26 // ããã¼æã¯åæ¢ 27 $('#div_ticker').hover(function() { 28 _interval.stop(); 29 }, function() { 30 _interval.start(); 31 }); 32 } 33}); 34 35var _interval = { 36 start : function() { 37 // æ¢ã«ONã«ãªã£ã¦ããæ/ãç¥ããããªãæã¯ä½ãããªã 38 if (timer == null && $('#div_ticker').length != 0) { 39 _interval.topic(); 40 } 41 }, 42 stop : function() { 43 if ($('#div_ticker').length != 0) { 44 clearTimeout(timer); 45 timer = null; 46 } 47 }, 48 set : function() { 49 // ãªã¹ãã®é çªã決ãã 50 ticker.numList ++; 51 if (ticker.numList > ticker.totalList - 1) { 52 ticker.numList = 0; 53 } 54 55 // aè¦ç´ ãåå¾ 56 var str = $('#news-list li').eq(ticker.numList).html(); 57 58 // ä¸ããä¸ï¼ãã§ã¼ãã¤ã³ãã§ã¼ãã¢ã¦ã 59 $('#div_ticker').animate({top: '-' + ticker.height, opacity: '0'}, ticker.time, 'linear', function(){ 60 $('#div_ticker').html(str); 61 $('#div_ticker').css('top', ticker.height).css('opacity', '0').animate({top: '0', opacity: '1.0'}, ticker.time, 'linear'); 62 }); 63 }, 64 topic : function() { 65 // on -> on ã®æã¯ã¡ãã»ã¼ã¸è¡¨ç¤º 66 // off -> onã®æã¯ä½ããã表示ã¾ã§éãéãã 67 if (timer != null) { 68 _interval.set(); 69 } 70 71 timer = setTimeout(_interval.topic, ticker.interval); 72 } 73} 74
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.