优化滚动
This commit is contained in:
2
js/jquery-autoscroll.js
vendored
2
js/jquery-autoscroll.js
vendored
@@ -1 +1 @@
|
||||
;(function(e){e.fn.extend({autoScroll:function(t){function s(){var t=r.find("ul:first"),n=t.find("li:first");if(i.type==="H"){var s=-n.outerWidth(!0)+"px";t.animate({marginLeft:s},800,function(){e(this).css({marginLeft:"0px"}).find("li:first").appendTo(this)})}else{var o=-n.outerHeight(!0)+"px";t.animate({marginTop:o},800,function(){e(this).css({marginTop:"0px"}).find("li:first").appendTo(this)})}}var n=null,r=this,i={type:"V",timer:5e3};return t=t||{},e.extend(i,t),n=setInterval(s,i.timer),r.each(function(){e(this).hover(function(){clearInterval(n)},function(){n=setInterval(s,i.timer)})})}})})(jQuery)
|
||||
;(function(e){e.fn.extend({autoScroll:function(t){function s(){var t=r.find("ul:first"),n=t.find("li:first");if(i.type==="H"){var s=-n.outerWidth(!0)+"px";t.animate({marginLeft:s},800,function(){e(this).css({marginLeft:"0px"}).find("li:first").appendTo(this)})}else{var o=-n.outerHeight(!0)+"px";t.animate({marginTop:o},800,function(){e(this).css({marginTop:"0px"}).find("li:first").appendTo(this)})}}var n=null,r=this,i={type:"V",timer:5e3};return t=t||{},e.extend(i,t),n=setInterval(s,i.timer),r.each(function(){e(this).hover(function(){clearInterval(n)},function(){clearInterval(n);n=setInterval(s,i.timer)})})}})})(jQuery)
|
||||
Reference in New Issue
Block a user