Browse Source

Adding minified version and thumbnail slider to demo. Refs #27.

pull/112/head
Andy Adams 12 years ago
parent
commit
8980e6f088
  1. BIN
      demo/1_thumb.jpg
  2. BIN
      demo/2_thumb.jpg
  3. BIN
      demo/3_thumb.jpg
  4. 13
      demo/demo.css
  5. 20
      demo/demo.html
  6. 11
      responsiveslides.min.js

BIN
demo/1_thumb.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

BIN
demo/2_thumb.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

BIN
demo/3_thumb.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

13
demo/demo.css

@ -206,6 +206,19 @@ h3 {
right: 0;
}
/* Thumbnail pager example */
#slider4-pager {
max-width: 260px;
}
#slider4-pager a {
padding: 0;
}
#slider4-pager .rslides_here a {
background: transparent;
}
@media screen and (max-width: 600px) {
h1 {
font: 24px/50px "Helvetica Neue", Helvetica, Arial, sans-serif;

20
demo/demo.html

@ -40,6 +40,11 @@
}
});
// Slideshow 4
$("#slider4").responsiveSlides({
pager: '#slider4-pager'
});
});
</script>
</head>
@ -63,6 +68,19 @@
</ul>
<!-- Slideshow 3 -->
<ul class="rslides" id="slider4">
<li><img src="1.jpg" alt="" /></li>
<li><img src="2.jpg" alt="" /></li>
<li><img src="3.jpg" alt="" /></li>
</ul>
<ul id="slider4-pager">
<li><a href="#"><img src="1_thumb.jpg" alt="" /></a></li>
<li><a href="#"><img src="2_thumb.jpg" alt="" /></a></li>
<li><a href="#"><img src="3_thumb.jpg" alt="" /></a></li>
</ul>
<!-- Slideshow 4 -->
<div class="callbacks_container">
<ul class="rslides" id="slider3">
<li>
@ -82,7 +100,7 @@
<!-- This is here just to demonstrate the callbacks -->
<ul class="events">
<li><h3>Example 3 callback events</h3></li>
<li><h3>Example 4 callback events</h3></li>
</ul>
<a href="http://responsiveslides.com/" id="download">See the documentation</a>

11
responsiveslides.min.js vendored

@ -1,6 +1,7 @@
/*! http://responsiveslides.com v1.32 by @viljamis */
(function(d,E,w){d.fn.responsiveSlides=function(h){var b=d.extend({auto:!0,speed:1E3,timeout:4E3,pager:!1,nav:!1,random:!1,pause:!1,pauseControls:!1,prevText:"Previous",nextText:"Next",maxwidth:"",controls:"",namespace:"rslides",before:function(){},after:function(){}},h);return this.each(function(){w++;var e=d(this),n,q,i,k,l,m=0,f=e.children(),x=f.size(),r=parseFloat(b.speed),y=parseFloat(b.timeout),s=parseFloat(b.maxwidth),c=b.namespace,g=c+w,z=c+"_nav "+g+"_nav",t=c+"_here",j=g+"_on",A=g+"_s",
p=d("<ul class='"+c+"_tabs "+g+"_tabs' />"),B={"float":"left",position:"relative"},F={"float":"none",position:"absolute"},u=function(a){b.before();f.stop().fadeOut(r,function(){d(this).removeClass(j).css(F)}).eq(a).fadeIn(r,function(){d(this).addClass(j).css(B);b.after();m=a})};b.random&&(f.sort(function(){return Math.round(Math.random())-0.5}),e.empty().append(f));f.each(function(a){this.id=A+a});e.addClass(c+" "+g);h&&h.maxwidth&&e.css("max-width",s);f.hide().eq(0).addClass(j).css(B).show();if(1<
f.size()){if(y<r+100)return;if(b.pager){var v=[];f.each(function(a){a+=1;v+="<li><a href='#' class='"+A+a+"'>"+a+"</a></li>"});p.append(v);l=p.find("a");h.controls?d(b.controls).append(p):e.after(p);n=function(a){l.closest("li").removeClass(t).eq(a).addClass(t)}}b.auto&&(q=function(){k=setInterval(function(){f.stop(!0,!0);var a=m+1<x?m+1:0;b.pager&&n(a);u(a)},y)},q());i=function(){b.auto&&(clearInterval(k),q())};b.pause&&e.hover(function(){clearInterval(k)},function(){i()});b.pager&&(l.bind("click",
function(a){a.preventDefault();b.pauseControls||i();a=l.index(this);m===a||d("."+j).queue("fx").length||(n(a),u(a))}).eq(0).closest("li").addClass(t),b.pauseControls&&l.hover(function(){clearInterval(k)},function(){i()}));if(b.nav){c="<a href='#' class='"+z+" prev'>"+b.prevText+"</a><a href='#' class='"+z+" next'>"+b.nextText+"</a>";h.controls?d(b.controls).append(c):e.after(c);var c=d("."+g+"_nav"),C=d("."+g+"_nav.prev");c.bind("click",function(a){a.preventDefault();if(!d("."+j).queue("fx").length){var c=
f.index(d("."+j)),a=c-1,c=c+1<x?m+1:0;u(d(this)[0]===C[0]?a:c);b.pager&&n(d(this)[0]===C[0]?a:c);b.pauseControls||i()}});b.pauseControls&&c.hover(function(){clearInterval(k)},function(){i()})}}if("undefined"===typeof document.body.style.maxWidth&&h.maxwidth){var D=function(){e.css("width","100%");e.width()>s&&e.css("width",s)};D();d(E).bind("resize",function(){D()})}})}})(jQuery,this,0);
(function(c,F,y){c.fn.responsiveSlides=function(j){var b=c.extend({auto:!0,speed:1E3,timeout:4E3,pager:!1,nav:!1,random:!1,pause:!1,pauseControls:!1,prevText:"Previous",nextText:"Next",maxwidth:"",controls:"",namespace:"rslides",before:function(){},after:function(){}},j);return this.each(function(){y++;var e=c(this),q,r,k,m,n,p=0,f=e.children(),z=f.size(),s=parseFloat(b.speed),A=parseFloat(b.timeout),t=parseFloat(b.maxwidth),d=b.namespace,g=d+y,B=d+"_nav "+g+"_nav",u=d+"_here",l=g+"_on",v=g+"_s",
h=c("<ul class='"+d+"_tabs "+g+"_tabs' />"),C={"float":"left",position:"relative"},G={"float":"none",position:"absolute"},w=function(a){b.before();f.stop().fadeOut(s,function(){c(this).removeClass(l).css(G)}).eq(a).fadeIn(s,function(){c(this).addClass(l).css(C);b.after();p=a})};b.random&&(f.sort(function(){return Math.round(Math.random())-0.5}),e.empty().append(f));f.each(function(a){this.id=v+a});e.addClass(d+" "+g);j&&j.maxwidth&&e.css("max-width",t);f.hide().eq(0).addClass(l).css(C).show();if(1<
f.size()){if(A<s+100)return;if(!0===b.pager){var x=[];f.each(function(a){a+=1;x+="<li><a href='#' class='"+v+a+"'>"+a+"</a></li>"});h.append(x);j.controls?c(b.controls).append(h):e.after(h)}else b.pager&&(h=c(b.pager),h.addClass(d+"_tabs "+g+"_tabs"),h.find("li").each(function(a){c(this).addClass(v+(a+1))}));b.pager&&(n=h.find("a"),q=function(a){n.closest("li").removeClass(u).eq(a).addClass(u)});b.auto&&(r=function(){m=setInterval(function(){f.stop(!0,!0);var a=p+1<z?p+1:0;b.pager&&q(a);w(a)},A)},
r());k=function(){b.auto&&(clearInterval(m),r())};b.pause&&e.hover(function(){clearInterval(m)},function(){k()});b.pager&&(n.bind("click",function(a){a.preventDefault();b.pauseControls||k();a=n.index(this);p===a||c("."+l).queue("fx").length||(q(a),w(a))}).eq(0).closest("li").addClass(u),b.pauseControls&&n.hover(function(){clearInterval(m)},function(){k()}));if(b.nav){d="<a href='#' class='"+B+" prev'>"+b.prevText+"</a><a href='#' class='"+B+" next'>"+b.nextText+"</a>";j.controls?c(b.controls).append(d):
e.after(d);var d=c("."+g+"_nav"),D=c("."+g+"_nav.prev");d.bind("click",function(a){a.preventDefault();if(!c("."+l).queue("fx").length){var d=f.index(c("."+l));a=d-1;d=d+1<z?p+1:0;w(c(this)[0]===D[0]?a:d);b.pager&&q(c(this)[0]===D[0]?a:d);b.pauseControls||k()}});b.pauseControls&&d.hover(function(){clearInterval(m)},function(){k()})}}if("undefined"===typeof document.body.style.maxWidth&&j.maxwidth){var E=function(){e.css("width","100%");e.width()>t&&e.css("width",t)};E();c(F).bind("resize",function(){E()})}})}})(jQuery,
this,0);
Loading…
Cancel
Save