Matt Hinchliffe
12 years ago
2 changed files with 3 additions and 7 deletions
@ -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("<ul class='"+c+"_tabs "+g+"_tabs' />"),A={"float":"left",position:"relative"},E={"float":"none",position:"absolute"},t=function(a){b.before();f.stop().fadeOut(q,function(){d(this).removeClass(j).css(E)}).eq(a).fadeIn(q,function(){d(this).addClass(j).css(A);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=z+a});e.addClass(c+" "+g);h&&h.maxwidth&&e.css("max-width",r);f.hide().eq(0).addClass(j).css(A).show();if(1< |
||||
f.size()){if(x<q+100)return;if(b.pager){var u=[];f.each(function(a){a=a+1;u=u+("<li><a href='#' class='"+z+a+"'>"+a+"</a></li>")});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<w?m+1:0;b.pager&&n(a);t(a)},x)},p());i=function(){if(b.auto){clearInterval(k);p()}};b.pause&&e.hover(function(){clearInterval(k)},function(){i()});b.pager&&(l.bind("click", |
||||
function(a){a.preventDefault();b.pauseControls||i();a=l.index(this);if(!(m===a||d("."+j+":animated").length)){n(a);t(a)}}).eq(0).closest("li").addClass(s),b.pauseControls&&l.hover(function(){clearInterval(k)},function(){i()}));if(b.nav){c="<a href='#' class='"+y+" prev'>"+b.prevText+"</a><a href='#' class='"+y+" next'>"+b.nextText+"</a>";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<w?m+1:0;t(d(this)[0]===B[0]?a:c);b.pager&&n(d(this)[0]===B[0]?a:c);b.pauseControls||i()}});b.pauseControls&&c.hover(function(){clearInterval(k)},function(){i()})}}if("undefined"===typeof document.body.style.maxWidth&&h.maxwidth){var C=function(){e.css("width","100%");e.width()>r&&e.css("width",r)};C();d(D).bind("resize",function(){C()})}})}})(jQuery,this,0); |
||||
(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("<ul class='"+v+"_tabs "+C+"_tabs' />"),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<o+100){return}if(e.pager){var z=[];y.each(function(G){var H=G+1;z+="<li><a href='#' class='"+j+H+"'>"+H+"</a></li>"});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<m?r+1:0;if(e.pager){E(G)}w(G)},k)};s()}t=function(){if(e.auto){clearInterval(B);s()}};if(e.pause){q.hover(function(){clearInterval(B)},function(){t()})}if(e.pager){h.bind("click",function(H){H.preventDefault();if(!e.pauseControls){t()}var G=h.index(this);if(r===G||y.queue("fx").length){return}E(G);w(G)}).eq(0).closest("li").addClass(F);if(e.pauseControls){h.hover(function(){clearInterval(B)},function(){t()})}}if(e.nav){var f="<a href='#' class='"+u+" prev'>"+e.prevText+"</a><a href='#' class='"+u+" next'>"+e.nextText+"</a>";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<m?r+1:0;w(c(this)[0]===D[0]?H:I);if(e.pager){E(c(this)[0]===D[0]?H:I)}if(!e.pauseControls){t()}});if(e.pauseControls){g.hover(function(){clearInterval(B)},function(){t()})}}}if(typeof document.body.style.maxWidth==="undefined"&&d.maxwidth){var p=function(){q.css("width","100%");if(q.width()>n){q.css("width",n)}};p();c(b).bind("resize",function(){p()})}})}})(jQuery,this,0); |
Loading…
Reference in new issue