Viljami S
13 years ago
5 changed files with 40 additions and 35 deletions
@ -1,5 +1,5 @@
|
||||
/*! ResponsiveSlides.js v1.05. (c) 2011-2012 Viljami Salminen. MIT License. http://responsive-slides.viljamis.com */ |
||||
(function(a,o,n){a.fn.responsiveSlides=function(e){var f=a.extend({speed:4E3,fade:1E3,auto:!0,maxwidth:"none"},e);return this.each(function(){n++;var b=a(this),g=function(){var a=parseFloat(f.maxwidth);e&&e.maxwidth&&"undefined"===typeof document.body.style.maxHeight&&b.each(function(){b.css("width","100%");b.width()>a?b.css("width",a):b.width()<a&&b.css("width","100%")})};(function(){var d=b.find("img"),c="rslides"+n,j=c+"_here",h=c+"_on",i=c+"_s",e=c+"_tabs",c=a('<ul class="'+e+'" />'),k=parseFloat(f.fade), |
||||
l={position:"relative","float":"left"},g={position:"absolute","float":"none"};if(1<b.find(d).length)if(d.each(function(a){this.id=i+a}),d.css({top:0,left:0,width:"100%",height:"inherit",position:"absolute"}),b.css({"max-width":parseFloat(f.maxwidth),width:"100%",overflow:"hidden",position:"relative"}).find(":first-child").css(l).end().find(d+":gt(0)").hide(),!0===f.auto)setInterval(function(){b.find(":first-child").fadeOut(k,function(){a(this).css(g)}).next(d).fadeIn(k,function(){a(this).css(l)}).end().appendTo(b)}, |
||||
parseFloat(f.speed));else{var m="";d.each(function(a){a+=1;m+='<li><a href="#'+i+a+'"class="'+i+a+'">'+a+"</a></li>"});c.append(m);b.after(c).find(":first-child").addClass(h);a("."+i+"1").parent().addClass(j);a("."+e+" a").each(function(b){var c=a(this);c.click(function(d){d.preventDefault();if(a("."+h+":animated").length)return!1;c.parent().hasClass(j)||(a("."+e+" li").removeClass(j),a("."+h).stop().fadeOut(k,function(){a(this).removeClass(h).css(g)}).end(),a("#"+i+b).stop().fadeIn(k,function(){a(this).addClass(h).css(l)}).end(), |
||||
c.parent().addClass(j))})})}})();g();a(o).resize(function(){g()})})}})(jQuery,this,0); |
||||
(function(a,o,n){a.fn.responsiveSlides=function(e){var f=a.extend({speed:4E3,fade:1E3,auto:!0,maxwidth:"none"},e);return this.each(function(){n++;var b=a(this),g=function(){var a=parseFloat(f.maxwidth);e&&e.maxwidth&&"undefined"===typeof document.body.style.maxHeight&&b.each(function(){b.css("width","100%");b.width()>a?b.css("width",a):b.width()<a&&b.css("width","100%")})};(function(){var d=b.find("img"),c="rslides"+n,e="rslides "+c,h=c+"_on",i=c+"_s",k=c+"_tabs",j=parseFloat(f.fade),c=a('<ul class="rslides_tabs '+ |
||||
k+'" />'),l={position:"relative","float":"left"},g={position:"absolute","float":"none"};if(1<b.find(d).length)if(d.each(function(a){this.id=i+a}),d.css({top:0,left:0,width:"100%",height:"inherit",position:"absolute"}),b.css({"max-width":parseFloat(f.maxwidth),width:"100%",overflow:"hidden",position:"relative"}).addClass(e).find(":first-child").css(l).end().find(d+":gt(0)").hide(),!0===f.auto)setInterval(function(){b.find(":first-child").fadeOut(j,function(){a(this).css(g)}).next(d).fadeIn(j,function(){a(this).css(l)}).end().appendTo(b)}, |
||||
parseFloat(f.speed));else{var m="";d.each(function(a){a+=1;m+='<li><a href="#"class="'+i+a+'">'+a+"</a></li>"});c.append(m);b.after(c).find(":first-child").addClass(h);a("."+i+"1").parent().addClass("rslides_here");a("."+k+" a").each(function(b){var c=a(this);c.click(function(d){d.preventDefault();if(a("."+h+":animated").length)return!1;c.parent().hasClass("rslides_here")||(a("."+k+" li").removeClass("rslides_here"),a("."+h).stop().fadeOut(j,function(){a(this).removeClass(h).css(g)}).end(),a("#"+ |
||||
i+b).stop().fadeIn(j,function(){a(this).addClass(h).css(l)}).end(),c.parent().addClass("rslides_here"))})})}})();g();a(o).resize(function(){g()})})}})(jQuery,this,0); |
Loading…
Reference in new issue