diff --git a/responsiveslides.js b/responsiveslides.js index d6ef35d..dadf04d 100644 --- a/responsiveslides.js +++ b/responsiveslides.js @@ -213,7 +213,7 @@ var idx = $tabs.index(this); // Break if element is already active or currently animated - if (index === idx || $("." + visibleClass + ":animated").length) { + if (index === idx || $("." + visibleClass).queue('fx').length) { return; } @@ -258,7 +258,7 @@ e.preventDefault(); // Prevent clicking if currently animated - if ($("." + visibleClass + ":animated").length) { + if ($("." + visibleClass).queue('fx').length) { return; } diff --git a/responsiveslides.min.js b/responsiveslides.min.js index b50459a..89107bc 100644 --- a/responsiveslides.min.js +++ b/responsiveslides.min.js @@ -1,6 +1,6 @@ /*! http://responsiveslides.com v1.32 by @viljamis */ -(function(d,D,v){d.fn.responsiveSlides=function(h){var b=d.extend({auto:!0,speed:1E3,timeout:4E3,pager:!1,nav:!1,random:!1,pause:!1,pauseControls:!1,prevText:"Previous",nextText:"Next",maxwidth:"",controls:"",namespace:"rslides",before:function(){},after:function(){}},h);return this.each(function(){v++;var e=d(this),n,p,i,k,l,m=0,f=e.children(),w=f.size(),q=parseFloat(b.speed),x=parseFloat(b.timeout),r=parseFloat(b.maxwidth),c=b.namespace,g=c+v,y=c+"_nav "+g+"_nav",s=c+"_here",j=g+"_on",z=g+"_s", -o=d("
"+a+"")});o.append(u);l=o.find("a");h.controls?d(b.controls).append(o):e.after(o);n=function(a){l.closest("li").removeClass(s).eq(a).addClass(s)}}b.auto&&(p=function(){k=setInterval(function(){f.stop(true,true);var a=m+1"+b.prevText+""+b.nextText+"";h.controls?d(b.controls).append(c):e.after(c);var c=d("."+g+"_nav"),B=d("."+g+"_nav.prev");c.bind("click",function(a){a.preventDefault();if(!d("."+j+":animated").length){var c= -f.index(d("."+j)),a=c-1,c=c+1 r&&e.css("width",r)};C();d(D).bind("resize",function(){C()})}})}})(jQuery,this,0); \ No newline at end of file +(function(d,E,w){d.fn.responsiveSlides=function(h){var b=d.extend({auto:!0,speed:1E3,timeout:4E3,pager:!1,nav:!1,random:!1,pause:!1,pauseControls:!1,prevText:"Previous",nextText:"Next",maxwidth:"",controls:"",namespace:"rslides",before:function(){},after:function(){}},h);return this.each(function(){w++;var e=d(this),n,q,i,k,l,m=0,f=e.children(),x=f.size(),r=parseFloat(b.speed),y=parseFloat(b.timeout),s=parseFloat(b.maxwidth),c=b.namespace,g=c+w,z=c+"_nav "+g+"_nav",t=c+"_here",j=g+"_on",A=g+"_s", +p=d(" "),B={"float":"left",position:"relative"},F={"float":"none",position:"absolute"},u=function(a){b.before();f.stop().fadeOut(r,function(){d(this).removeClass(j).css(F)}).eq(a).fadeIn(r,function(){d(this).addClass(j).css(B);b.after();m=a})};b.random&&(f.sort(function(){return Math.round(Math.random())-0.5}),e.empty().append(f));f.each(function(a){this.id=A+a});e.addClass(c+" "+g);h&&h.maxwidth&&e.css("max-width",s);f.hide().eq(0).addClass(j).css(B).show();if(1< +f.size()){if(y
"+a+""});p.append(v);l=p.find("a");h.controls?d(b.controls).append(p):e.after(p);n=function(a){l.closest("li").removeClass(t).eq(a).addClass(t)}}b.auto&&(q=function(){k=setInterval(function(){f.stop(!0,!0);var a=m+1 "+b.prevText+""+b.nextText+"";h.controls?d(b.controls).append(c):e.after(c);var c=d("."+g+"_nav"),C=d("."+g+"_nav.prev");c.bind("click",function(a){a.preventDefault();if(!d("."+j).queue("fx").length){var c= +f.index(d("."+j)),a=c-1,c=c+1 s&&e.css("width",s)};D();d(E).bind("resize",function(){D()})}})}})(jQuery,this,0); \ No newline at end of file