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