The animated repetition of the JQ animate causes the browser to die.
Add Stop () before Animate ().
(function ($) {var Silde = {Init:function (a,number,gundong,status) {This.auto (a,number,gundong,status ); }, Auto:function (a,number,gundong,status) {var _root = this, $ul = $ (a). Find ("ul"), $lis = $ul. Children ("Li"), width = $lis. EQ (0). Width (), numberaccout = number | | 4, gundongaccout = Gundong | | 1, auto_status = Status | | True, Mf=parseint ($ul. css (' margin-left ')); $ (a). css ({' Width ': width*numberaccout}); if (auto_status) {timemachine=setinterval (function () {() {if (-mf< ($lis. Length-numb Eraccout) *width) {MF = mf-width; }else{MF = 0; } $ul. Stop (). Animate ({' Margin-left ': MF + ' px ' }, ' Slow '); },3000); }//Suspend $ ('. Slider ') when contacting. Hover (function () {window.clearinterval (timemachine); }); Move the mouse over $ ('. Slider '). MouseLeave (function () {silde.init (a,number,gundong,auto_status); }); $ ('. Arrow-right '). Click (function () {if (-mf> ($lis. length-numberaccout-1) *width) {retur N } MF-= width; $ul. Stop (). Animate ({' Margin-left ': MF + ' px '}, ' fast '); }); $ ('. Arrow-left '). Click (function () {if (MF = = = 0) {return; } MF + = width; $ul. Stop (). Animate ({' Margin-left ': MF + ' px '}, ' fast '); } ); } }; $ (function () {silde.init ('. Slider ', 3,1,true); });}) (JQuery);
JQ Animate animation Homemade Slider