Andy Adams
12 years ago
6 changed files with 38 additions and 6 deletions
After Width: | Height: | Size: 6.7 KiB |
After Width: | Height: | Size: 6.5 KiB |
After Width: | Height: | Size: 5.7 KiB |
@ -1,6 +1,7 @@
|
||||
/*! http://responsiveslides.com v1.32 by @viljamis */ |
||||
(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("<ul class='"+c+"_tabs "+g+"_tabs' />"),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<r+100)return;if(b.pager){var v=[];f.each(function(a){a+=1;v+="<li><a href='#' class='"+A+a+"'>"+a+"</a></li>"});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<x?m+1:0;b.pager&&n(a);u(a)},y)},q());i=function(){b.auto&&(clearInterval(k),q())};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);m===a||d("."+j).queue("fx").length||(n(a),u(a))}).eq(0).closest("li").addClass(t),b.pauseControls&&l.hover(function(){clearInterval(k)},function(){i()}));if(b.nav){c="<a href='#' class='"+z+" prev'>"+b.prevText+"</a><a href='#' class='"+z+" next'>"+b.nextText+"</a>";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<x?m+1:0;u(d(this)[0]===C[0]?a:c);b.pager&&n(d(this)[0]===C[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 D=function(){e.css("width","100%");e.width()>s&&e.css("width",s)};D();d(E).bind("resize",function(){D()})}})}})(jQuery,this,0); |
||||
(function(c,F,y){c.fn.responsiveSlides=function(j){var b=c.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(){}},j);return this.each(function(){y++;var e=c(this),q,r,k,m,n,p=0,f=e.children(),z=f.size(),s=parseFloat(b.speed),A=parseFloat(b.timeout),t=parseFloat(b.maxwidth),d=b.namespace,g=d+y,B=d+"_nav "+g+"_nav",u=d+"_here",l=g+"_on",v=g+"_s", |
||||
h=c("<ul class='"+d+"_tabs "+g+"_tabs' />"),C={"float":"left",position:"relative"},G={"float":"none",position:"absolute"},w=function(a){b.before();f.stop().fadeOut(s,function(){c(this).removeClass(l).css(G)}).eq(a).fadeIn(s,function(){c(this).addClass(l).css(C);b.after();p=a})};b.random&&(f.sort(function(){return Math.round(Math.random())-0.5}),e.empty().append(f));f.each(function(a){this.id=v+a});e.addClass(d+" "+g);j&&j.maxwidth&&e.css("max-width",t);f.hide().eq(0).addClass(l).css(C).show();if(1< |
||||
f.size()){if(A<s+100)return;if(!0===b.pager){var x=[];f.each(function(a){a+=1;x+="<li><a href='#' class='"+v+a+"'>"+a+"</a></li>"});h.append(x);j.controls?c(b.controls).append(h):e.after(h)}else b.pager&&(h=c(b.pager),h.addClass(d+"_tabs "+g+"_tabs"),h.find("li").each(function(a){c(this).addClass(v+(a+1))}));b.pager&&(n=h.find("a"),q=function(a){n.closest("li").removeClass(u).eq(a).addClass(u)});b.auto&&(r=function(){m=setInterval(function(){f.stop(!0,!0);var a=p+1<z?p+1:0;b.pager&&q(a);w(a)},A)}, |
||||
r());k=function(){b.auto&&(clearInterval(m),r())};b.pause&&e.hover(function(){clearInterval(m)},function(){k()});b.pager&&(n.bind("click",function(a){a.preventDefault();b.pauseControls||k();a=n.index(this);p===a||c("."+l).queue("fx").length||(q(a),w(a))}).eq(0).closest("li").addClass(u),b.pauseControls&&n.hover(function(){clearInterval(m)},function(){k()}));if(b.nav){d="<a href='#' class='"+B+" prev'>"+b.prevText+"</a><a href='#' class='"+B+" next'>"+b.nextText+"</a>";j.controls?c(b.controls).append(d): |
||||
e.after(d);var d=c("."+g+"_nav"),D=c("."+g+"_nav.prev");d.bind("click",function(a){a.preventDefault();if(!c("."+l).queue("fx").length){var d=f.index(c("."+l));a=d-1;d=d+1<z?p+1:0;w(c(this)[0]===D[0]?a:d);b.pager&&q(c(this)[0]===D[0]?a:d);b.pauseControls||k()}});b.pauseControls&&d.hover(function(){clearInterval(m)},function(){k()})}}if("undefined"===typeof document.body.style.maxWidth&&j.maxwidth){var E=function(){e.css("width","100%");e.width()>t&&e.css("width",t)};E();c(F).bind("resize",function(){E()})}})}})(jQuery, |
||||
this,0); |
Loading…
Reference in new issue