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