Viljami S
13 years ago
3 changed files with 4 additions and 4 deletions
@ -1,4 +1,4 @@
|
||||
/*! http://responsive-slides.viljamis.com v1.1 by @viljamis */ |
||||
/*! http://responsive-slides.viljamis.com v1.10 by @viljamis */ |
||||
(function(c,m,n){c.fn.responsiveSlides=function(k){var b=c.extend({auto:!0,pagination:!1,fade:1E3,maxwidth:"none",speed:4E3},k);return this.each(function(){n++;var e=c(this),g=0,f=e.children(),u=f.size(),o=parseFloat(b.fade),d="rslides"+n,v="rslides "+d,h=d+"_on",p=d+"_s",d=c('<ul class="rslides_tabs '+(d+"_tabs")+'" />'),q={"float":"left",position:"relative"},w={"float":"none",position:"absolute"},r=function(a){f.stop().fadeOut(o,function(){c(this).removeClass(h).css(w)}).eq(a).fadeIn(o,function(){c(this).addClass(h).css(q); |
||||
g=a})};if(1<f.size()){f.each(function(a){this.id=p+a});e.css("max-width",b.maxwidth).addClass(v);f.hide().eq(0).addClass(h).css(q).show();if(!0===b.pagination){var i=[];f.each(function(a){a+=1;i.push("<li>");i.push('<a href="#" class="'+p+a+'">'+a+"</a>");i.push("</li>")});d.append(i.join(""));var j=d.find("a");e.after(d)}if(!0===b.auto){var l,s;l=function(){s=setInterval(function(){var a=g+1<u?g+1:0;!0===b.pagination&&j.closest("li").removeClass("rslides_here").eq(a).addClass("rslides_here");r(a)}, |
||||
parseFloat(b.speed))};l()}!0===b.pagination&&j.on("ontouchstart"in m?"touchstart":"click",function(a){a.preventDefault();!0===b.auto&&(clearInterval(s),l());a=j.index(this);if(g!==a){if(c("."+h+":animated").length)return!1;j.closest("li").removeClass("rslides_here").eq(a).addClass("rslides_here");r(a)}}).eq(0).closest("li").addClass("rslides_here")}if("undefined"===typeof document.body.style.maxWidth&&k&&k.maxwidth){var t=function(){e.css("width","100%");e.width()>b.maxwidth&&e.css("width",b.maxwidth)}; |
||||
|
Loading…
Reference in new issue