You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
4 lines
1.5 KiB
4 lines
1.5 KiB
13 years ago
|
/*! ResponsiveSlides.js v1.10. (c) 2011-2012 Viljami Salminen & Bastian Gutschke. MIT License. http://responsive-slides.viljamis.com */
|
||
|
(function(c,m,n){c.fn.responsiveSlides=function(j){var d=c.extend({auto:!0,fade:1E3,maxwidth:"none",speed:4E3},j);return this.each(function(){n++;var e=c(this),h=0,f=e.children();c("img",this);var s=f.size(),b="rslides"+n,t="rslides "+b,i=b+"_on",k=b+"_s",b=b+"_tabs",o=parseFloat(d.fade),b=c('<ul class="rslides_tabs '+b+'" />'),p={"float":"left",position:"relative"},u={"float":"none",position:"absolute"},q=function(a){f.stop().fadeOut(o,function(){c(this).removeClass(i).css(u)}).eq(a).fadeIn(o,function(){c(this).addClass(i).css(p);
|
||
|
h=a})};if(1<f.size())if(f.each(function(a){this.id=k+a}),e.css("max-width",d.maxwidth).addClass(t),f.hide().eq(0).addClass(i).css(p).show(),!0===d.auto)setInterval(function(){q(h+1<s?h+1:0)},parseFloat(d.speed));else{var g=[];f.each(function(a){a+=1;g.push("<li>");g.push('<a href="#'+k+a+'" ');g.push('class="'+k+a+'">'+a+"</a>");g.push("</li>")});b.append(g.join(""));var l=b.find("a");l.on("ontouchstart"in m?"touchstart":"click",function(a){a.preventDefault();a=l.index(this);if(h!==a){if(c("."+i+
|
||
|
":animated").length)return!1;l.closest("li").removeClass("rslides_here").eq(a).addClass("rslides_here");q(a)}}).eq(0).closest("li").addClass("rslides_here");e.after(b)}if("undefined"===typeof document.body.style.maxWidth&&j&&j.maxwidth){var r=function(){e.css("width","100%");e.width()>d.maxwidth&&e.css("width",d.maxwidth)};r();c(m).on("resize",function(){r()})}})}})(jQuery,this,0);
|