diff --git a/responsiveslides.js b/responsiveslides.js index 77c46ba..a1a8686 100644 --- a/responsiveslides.js +++ b/responsiveslides.js @@ -1,4 +1,4 @@ -/*! http://responsive-slides.viljamis.com v1.21 by @viljamis */ +/*! http://responsive-slides.viljamis.com v1.22 by @viljamis */ (function ($, window, i) { $.fn.responsiveSlides = function (options) { @@ -11,7 +11,8 @@ "nextText": "Next", // String: Text for the "next" button "fade": 1000, // Integer: Crossfade time, in milliseconds "maxwidth": "none", // Integer: Max-width of the Slideshow, in pixels - "speed": 4000 // Integer: How long image shows before fading to next, in milliseconds + "speed": 4000, // Integer: How long image shows before fading to next, in milliseconds + "namespace": "rslides" // String: change the default namespace }, options); return this.each(function () { @@ -27,7 +28,7 @@ fadetime = parseFloat(settings.fade), // Namespacing - namespace = "rslides", + namespace = settings.namespace, namespaceIndex = namespace + i, // Classes @@ -46,6 +47,7 @@ // Fading animation var slideTo = function (idx) { + $this.trigger(namespace + "-before"); $slide .stop() .fadeOut(fadetime, function () { @@ -57,7 +59,8 @@ .fadeIn(fadetime, function () { $(this) .addClass(visibleClass) - .css(visible); + .css(visible) + .trigger(namespace + "-after"); index = idx; }); }; @@ -182,10 +185,10 @@ // Build navigation var navMarkup = - "" + + "" + settings.prevText + "" + - "" + + "" + settings.nextText + ""; diff --git a/responsiveslides.min.js b/responsiveslides.min.js index 6d09693..888e0d6 100644 --- a/responsiveslides.min.js +++ b/responsiveslides.min.js @@ -1,6 +1,6 @@ -/*! http://responsive-slides.viljamis.com v1.21 by @viljamis */ -(function(c,y,r){c.fn.responsiveSlides=function(l){var b=c.extend({auto:!0,pagination:!1,nav:!1,prevText:"Previous",nextText:"Next",fade:1E3,maxwidth:"none",speed:4E3},l);return this.each(function(){r++;var g=c(this),h=0,e=g.children(),s=e.size(),t=parseFloat(b.fade),d="rslides"+r,m="rslides "+d,f=d+"_on",u=d+"_s",n=c('