Browse Source

Adds 'header'

pull/32/merge
Viljami S 13 years ago
parent
commit
cf4b4999ec
  1. 40
      responsiveslides.js
  2. 6
      responsiveslides.min.js

40
responsiveslides.js

@ -1,4 +1,34 @@
/*! http://responsive-slides.viljamis.com v1.23 by @viljamis */
/*! ResponsiveSlides.js v1.23
* http://responsive-slides.viljamis.com
*
* Copyright (c) 2011-2012 @viljamis
* Available under the MIT license
*/
/* ResponsiveSlides.js is a tiny jQuery plugin that creates a responsive
* slideshow using images inside <ul>. It works with wide range of browsers
* including all IE versions from IE6 and up. It also adds css max-width
* support for IE6 and other browsers that don't natively support it. Only
* dependency is jQuery (1.4 and up) and that all the images are same size.
*
* Features:
* - Fully responsive
* - Under 1kb minified and gzipped
* - Simple markup using unordered lists
* - Settings for transition and timeout durations
* - Multiple slideshows supported
* - Automatic and manual fade
* - Works in all major desktop and mobile browsers
* - Captions and other html-elements supported inside slides
* - Separate pagination and next/prev controls
* - Possibility to choose where the controls append to
* - Images can be wrapped inside links
* - Optional 'before' and 'after' callbacks
*
*/
/*jslint browser: true, sloppy: true, vars: true, plusplus: true, maxerr: 50, indent: 2 */
(function ($, window, i) {
$.fn.responsiveSlides = function (options) {
@ -9,8 +39,8 @@
"timeout": 4000, // Integer: Time between slide transitions, in milliseconds
"pager": false, // Boolean: Show pager, true or false
"nav": false, // Boolean: Show navigation, true or false
"prev": "Previous", // String: Text for the "previous" button
"next": "Next", // String: Text for the "next" button
"prevText": "Previous", // String: Text for the "previous" button
"nextText": "Next", // String: Text for the "next" button
"maxwidth": "none", // Integer: Max-width of the slideshow, in pixels
"controls": "", // Selector: Where controls should be appended to, default is after the <ul>
"namespace": "rslides" // String: change the default namespace used
@ -186,8 +216,8 @@
// Navigation
if (settings.nav === true) {
var navMarkup =
"<a href='#' class='" + navClass + " prev'>" + settings.prev + "</a>" +
"<a href='#' class='" + navClass + " next'>" + settings.next + "</a>";
"<a href='#' class='" + navClass + " prev'>" + settings.prevText + "</a>" +
"<a href='#' class='" + navClass + " next'>" + settings.nextText + "</a>";
// Inject navigation
if (options.controls) {

6
responsiveslides.min.js vendored

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