Browse Source

Change $pagination to use 'tabsClass'

pull/10/head
Viljami S 13 years ago
parent
commit
c2443d1670
  1. 2
      example/index.html
  2. 2
      responsiveslides.js
  3. 8
      responsiveslides.min.js

2
example/index.html

@ -4,7 +4,7 @@
<meta charset="utf-8" /> <meta charset="utf-8" />
<title>ResponsiveSlides.js &middot; Responsive jQuery Slideshow</title> <title>ResponsiveSlides.js &middot; Responsive jQuery Slideshow</title>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;" /> <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;" />
<link rel="stylesheet" href="styles.css?v1.02" /> <link rel="stylesheet" href="styles.css?v1.03" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
<script src="../responsiveslides.min.js"></script> <script src="../responsiveslides.min.js"></script>
<script> <script>

2
responsiveslides.js

@ -24,7 +24,7 @@
visibleClass = namespace + '_on', visibleClass = namespace + '_on',
slideClassPrefix = namespace + '_s', slideClassPrefix = namespace + '_s',
tabsClass = namespace + '_tabs', tabsClass = namespace + '_tabs',
$pagination = $('<ul class="' + namespace + '_tabs" />'), $pagination = $('<ul class="' + tabsClass + '" />'),
fadetime = parseFloat(settings.fade), fadetime = parseFloat(settings.fade),
visible = { 'position': 'relative', 'float': 'left' }, visible = { 'position': 'relative', 'float': 'left' },
hidden = { 'position': 'absolute', 'float': 'none' }; hidden = { 'position': 'absolute', 'float': 'none' };

8
responsiveslides.min.js vendored

@ -1,5 +1,5 @@
/*! ResponsiveSlides.js v1.03. (c) 2011 Viljami Salminen. MIT License. http://responsive-slides.viljamis.com */ /*! ResponsiveSlides.js v1.03. (c) 2011 Viljami Salminen. MIT License. http://responsive-slides.viljamis.com */
(function(a){a.fn.responsiveSlides=function(e){var c={speed:4E3,fade:1E3,auto:!0,maxwidth:"none",namespace:"rs"};return this.each(function(){var b=a(this);e&&a.extend(c,e);var f=function(){var a=parseFloat(c.maxwidth);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"),g=c.namespace,j=g+"_here",h=g+"_on",i=g+"_s",e=g+"_tabs",f=a('<ul class="'+g+'_tabs" />'), (function(a){a.fn.responsiveSlides=function(e){var c={speed:4E3,fade:1E3,auto:!0,maxwidth:"none",namespace:"rs"};return this.each(function(){var b=a(this);e&&a.extend(c,e);var f=function(){var a=parseFloat(c.maxwidth);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"),i=c.namespace,j=i+"_here",g=i+"_on",h=i+"_s",e=i+"_tabs",f=a('<ul class="'+e+'" />'),
k=parseFloat(c.fade),l={position:"relative","float":"left"},m={position:"absolute","float":"none"};1>=b.find(d).length||(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(c.maxwidth),width:"100%",overflow:"hidden",position:"relative"}),b.find(":first-child").css(l),b.find(d+":gt(0)").hide(),!0===c.auto?setInterval(function(){b.find(":first-child").fadeOut(k,function(){a(this).css(m)}).next(d).fadeIn(k,function(){a(this).css(l)}).end().appendTo(b)}, k=parseFloat(c.fade),l={position:"relative","float":"left"},m={position:"absolute","float":"none"};1>=b.find(d).length||(d.each(function(a){this.id=h+a}),d.css({top:0,left:0,width:"100%",height:"inherit",position:"absolute"}),b.css({"max-width":parseFloat(c.maxwidth),width:"100%",overflow:"hidden",position:"relative"}),b.find(":first-child").css(l),b.find(d+":gt(0)").hide(),!0===c.auto?setInterval(function(){b.find(":first-child").fadeOut(k,function(){a(this).css(m)}).next(d).fadeIn(k,function(){a(this).css(l)}).end().appendTo(b)},
parseFloat(c.speed)):(d.each(function(a){a+=1;tabMarkup=["<li>",'<a href="#'+i+a+'"','class="'+i+a+'">'+a+"</a>","</li>"].join("");f.append(tabMarkup)}),b.after(f),b.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(m)}).end(),a("#"+i+b).stop().fadeIn(k, parseFloat(c.speed)):(d.each(function(a){a+=1;tabMarkup=["<li>",'<a href="#'+h+a+'"','class="'+h+a+'">'+a+"</a>","</li>"].join("");f.append(tabMarkup)}),b.after(f),b.find(":first-child").addClass(g),a("."+h+"1").parent().addClass(j),a("."+e+" a").each(function(b){var c=a(this);c.click(function(d){d.preventDefault();if(a("."+g+":animated").length)return!1;c.parent().hasClass(j)||(a("."+e+" li").removeClass(j),a("."+g).stop().fadeOut(k,function(){a(this).removeClass(g).css(m)}).end(),a("#"+h+b).stop().fadeIn(k,
function(){a(this).addClass(h).css(l)}).end(),c.parent().addClass(j))})})))})();f();a(window).resize(function(){f()})})}})(jQuery); function(){a(this).addClass(g).css(l)}).end(),c.parent().addClass(j))})})))})();f();a(window).resize(function(){f()})})}})(jQuery);
Loading…
Cancel
Save