diff --git a/responsiveslides.js b/responsiveslides.js index 9b878dc..edd977b 100644 --- a/responsiveslides.js +++ b/responsiveslides.js @@ -3,32 +3,34 @@ $.fn.responsiveSlides = function (options) { - // Merge default settings with optional arguments + // Default settings var settings = $.extend({ "auto": true, - "fade": 300, + "fade": 1000, "maxwidth": "none", "speed": 4000 }, options); return this.each(function () { - // Index, which is used for namespacing + // Index which is used for namespacing i++; var $this = $(this); - var $slide = $this.children(), + var index = 0, + $slide = $this.children(), $img = $("img", this), - index = 0, length = $slide.size(), - namespace = "rslides" + i, + namespace = "rslides", + namespaceIndex = namespace + i, + namespaceIndexClass = namespace + " " + namespaceIndex, activeClass = namespace + "_here", - visibleClass = namespace + '_on', - slideClassPrefix = namespace + "_s", + visibleClass = namespaceIndex + "_on", + slideClassPrefix = namespaceIndex + "_s", + tabsClass = namespaceIndex + "_tabs", fadetime = parseFloat(settings.fade), - tabsClass = namespace + "_tabs", - $pagination = $("