Viljami S
13 years ago
2 changed files with 56 additions and 55 deletions
@ -1,5 +1,5 @@
|
||||
/*! http://responsive-slides.viljamis.com v1.23 by @viljamis */ |
||||
(function(c,D,s){c.fn.responsiveSlides=function(i){var b=c.extend({auto:!0,speed:1E3,timeout:4E3,pager:!1,nav:!1,prev:"Previous",next:"Next",maxwidth:"none",controls:"",namespace:"rslides"},i);return this.each(function(){s++;var d=c(this),j=0,f=d.children(),t=f.size(),u=parseFloat(b.speed),g=b.namespace,e=g+s,h=g+" "+e,v=g+"_nav "+e+"_nav",m=g+"_here",k=e+"_on",w=e+"_s",l=c("<ul class='"+g+"_tabs "+(e+"_tabs")+"' />"),x={"float":"left",position:"relative"},E={"float":"none",position:"absolute"},n= |
||||
function(a){d.trigger(g+"-before");f.stop().fadeOut(u,function(){c(this).removeClass(k).css(E)}).eq(a).fadeIn(u,function(){c(this).addClass(k).css(x).trigger(g+"-after");j=a})};if(1<f.size()){f.each(function(a){this.id=w+a});d.css("max-width",b.maxwidth).addClass(h);f.hide().eq(0).addClass(k).css(x).show();if(!0===b.pager){var o=[];f.each(function(a){a+=1;o+="<li><a href='#' class='"+w+a+"'>"+a+"</a></li>"});l.append(o);var p=l.find("a");i.controls?c(b.controls).append(l):d.after(l);var q=function(a){p.closest("li").removeClass(m).eq(a).addClass(m)}}if(!0=== |
||||
b.auto){var r,y;r=function(){y=setInterval(function(){var a=j+1<t?j+1:0;!0===b.pager&&q(a);n(a)},parseFloat(b.timeout))};r()}var z=function(){!0===b.auto&&(clearInterval(y),r())},A=function(a){c("."+k+":animated").length&&a.preventDefault()};!0===b.pager&&p.on("click",function(a){a.preventDefault();A();z();a=p.index(this);j!==a&&(q(a),n(a))}).eq(0).closest("li").addClass(m)}if(!0===b.nav){h="<a href='#' class='"+v+" prev'>"+b.prev+"</a><a href='#' class='"+v+" next'>"+b.next+"</a>";i.controls?c(b.controls).append(h): |
||||
d.after(h);var h=c("."+e+"_nav"),B=c("."+e+"_nav.prev");c("."+e+"_nav.next");h.on("click",function(a){a.preventDefault();A();var d=f.index(c("."+k)),a=d-1,d=d+1<t?j+1:0;n(c(this)===B?a:d);!0===b.pager&&q(c(this)===B?a:d);z()})}if("undefined"===typeof document.body.style.maxWidth&&i&&i.maxwidth){var C=function(){d.css("width","100%");d.width()>b.maxwidth&&d.css("width",b.maxwidth)};C();c(D).on("resize",function(){C()})}})}})(jQuery,this,0); |
||||
(function(c,C,t){c.fn.responsiveSlides=function(j){var b=c.extend({auto:!0,speed:1E3,timeout:4E3,pager:!1,nav:!1,prev:"Previous",next:"Next",maxwidth:"none",controls:"",namespace:"rslides"},j);return this.each(function(){t++;var d=c(this),l,o,p,u,m,k=0,e=d.children(),v=e.size(),w=parseFloat(b.speed),f=b.namespace,g=f+t,h=f+" "+g,x=f+"_nav "+g+"_nav",q=f+"_here",i=g+"_on",y=g+"_s",n=c("<ul class='"+f+"_tabs "+g+"_tabs' />"),z={"float":"left",position:"relative"},D={"float":"none",position:"absolute"}, |
||||
r=function(a){d.trigger(f+"-before");e.stop().fadeOut(w,function(){c(this).removeClass(i).css(D)}).eq(a).fadeIn(w,function(){c(this).addClass(i).css(z).trigger(f+"-after");k=a})};if(1<e.size()){e.each(function(a){this.id=y+a});d.css("max-width",b.maxwidth).addClass(h);e.hide().eq(0).addClass(i).css(z).show();if(!0===b.pager){var s=[];e.each(function(a){a+=1;s+="<li><a href='#' class='"+y+a+"'>"+a+"</a></li>"});n.append(s);m=n.find("a");j.controls?c(b.controls).append(n):d.after(n);l=function(a){m.closest("li").removeClass(q).eq(a).addClass(q)}}!0=== |
||||
b.auto&&(o=function(){u=setInterval(function(){var a=k+1<v?k+1:0;!0===b.pager&&l(a);r(a)},parseFloat(b.timeout))},o());p=function(){if(b.auto===true){clearInterval(u);o()}};!0===b.pager&&m.bind("click",function(a){a.preventDefault();p();a=m.index(this);if(!(k===a||c("."+i+":animated").length)){l(a);r(a)}}).eq(0).closest("li").addClass(q)}if(!0===b.nav){h="<a href='#' class='"+x+" prev'>"+b.prev+"</a><a href='#' class='"+x+" next'>"+b.next+"</a>";j.controls?c(b.controls).append(h):d.after(h);var h= |
||||
c("."+g+"_nav"),A=c("."+g+"_nav.prev");h.bind("click",function(a){a.preventDefault();if(!c("."+i+":animated").length){var d=e.index(c("."+i)),a=d-1,d=d+1<v?k+1:0;r(c(this)===A?a:d);!0===b.pager&&l(c(this)===A?a:d);p()}})}if("undefined"===typeof document.body.style.maxWidth&&j&&j.maxwidth){var B=function(){d.css("width","100%");d.width()>parseFloat(b.maxwidth)&&d.css("width",parseFloat(b.maxwidth))};B();c(C).bind("resize",function(){B()})}})}})(jQuery,this,0); |
Loading…
Reference in new issue