1/* 2jQéæç¬å©æ°©å§©ç¯ï¸¿ç¬æ¶å¬¬ç椤å«å¯é? 3*/ 4(function($){ 5$.fn.extend({ 6 Scroll:function(opt,callback){ 7 //éåæéæ¿îé? 8 if(!opt) var opt={}; 9 var _btnUp = $("#"+ opt.up);//Shawphy:éæç¬é¸å¤æ³ 10 var _btnDown = $("#"+ opt.down);//Shawphy:éæç¬ é¸å¤æ³ 11 var timerID; 12 var _this=this.eq(0).find("ul:first"); 13 var lineH=_this.find("li:first").height(), //é®å³°å½çå²ä½© 14 line=opt.line?parseInt(opt.line,10):parseInt(this.height()/lineH,10), //å§£å¿î¼å©æ°©å§©éå®îéå¸®ç´æ¦æ¨¿î »æ¶è½°ç«´çå¿¥ç´éå´åç¹ç°æ«æ¥æ¡¦å®³ 15 speed=opt.speed?parseInt(opt.speed,10):1000; //éå³°å§©éç·å®³éå±¾æé¾è°ç§ºæ¾¶Ñç´éç·å®³çå©åéå î ç»æçº§ 16 timer=opt.timer //?parseInt(opt.timer,10):3000; //婿°©å§©é嬿¤éæ®æ£¿é æçº¸å§£î¤îé? 17 if(line==0) line=1; 18 var upHeight=0-line*lineH; 19 //婿°©å§©éè¥æ 20 var scrollUp=function(){ 21 _btnUp.unbind("click",scrollUp); //Shawphy:éæ ¨ç§·éæç¬é¸å¤æ³éå«å±éæ®ç²¦ç¹? 22 _this.animate({ 23 marginTop:upHeight 24 },speed,function(){ 25 for(i=1;i<=line;i++){ 26 _this.find("li:first").appendTo(_this); 27 } 28 _this.css({marginTop:0}); 29 _btnUp.bind("click",scrollUp); //Shawphy:ç¼æç¾éæç¬é¸å¤æ³éåå£éè®³ç°¨æµ ? 30 }); 31 32 } 33 //Shawphy:éæç¬ ç¼å©ãéè¥æ 34 var scrollDown=function(){ 35 _btnDown.unbind("click",scrollDown); 36 for(i=1;i<=line;i++){ 37 _this.find("li:last").show().prependTo(_this); 38 } 39 _this.css({marginTop:upHeight}); 40 _this.animate({ 41 marginTop:0 42 },speed,function(){ 43 _btnDown.bind("click",scrollDown); 44 }); 45 } 46 //Shawphy:éîå§©é¾î æ 47 var autoPlay = function(){ 48 if(timer)timerID = window.setInterval(scrollUp,timer); 49 }; 50 var autoStop = function(){ 51 if(timer)window.clearInterval(timerID); 52 }; 53 //榧ç³ç£æµå¬©æ¬¢ç¼æç¾ 54 _this.hover(autoStop,autoPlay).mouseout(); 55 _btnUp.css("cursor","pointer").click( scrollUp ).hover(autoStop,autoPlay);//Shawphy:éæç¬éæç¬ 榧ç³ç£æµå¬©æ¬¢ç¼æç¾ 56 _btnDown.css("cursor","pointer").click( scrollDown ).hover(autoStop,autoPlay); 57 58 } 59}) 60})(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.