"
+ html: dataTitle
+ ).appendTo(paginationLink)
+
# bind click events
paginationLink.click (e) =>
e.preventDefault()
@@ -256,7 +274,6 @@
@stop(true)
# Goto to selected slide
@goto( ($(e.currentTarget).attr("data-slidesjs-item") * 1) + 1 )
- )
# Bind update on browser resize
$(window).bind("resize", () =>
@@ -516,7 +533,7 @@
# Stop/pause slideshow on mouse enter
slidesContainer.bind "mouseenter", =>
clearTimeout @data.restartDelay
- $.data this, "restartDelay", null
+ $.data this, "restartDelay", null
@stop()
# Play slideshow on mouse leave
@@ -609,7 +626,7 @@
zIndex: 10
# Start the slide animation
- @options.callback.start(currentSlide + 1)
+ @options.callback.start(currentSlide + 1, next + 1)
if @data.vendorPrefix
# If supported use CSS3 for the animation
@@ -656,7 +673,7 @@
@_setuptouch() if @data.touch
# End of the animation, call complete callback
- @options.callback.complete(next + 1)
+ @options.callback.complete(currentSlide + 1, next + 1)
else
# If CSS3 isn't support use JavaScript for the animation
slidesControl.stop().animate
@@ -676,7 +693,7 @@
$.data this, "animating", false
# End of the animation, call complete callback
- @options.callback.complete(next + 1)
+ @options.callback.complete(currentSlide + 1, next + 1)
)
# @_fade()
@@ -723,7 +740,7 @@
zIndex: 10
# Start of the animation, call the start callback
- @options.callback.start(currentSlide + 1)
+ @options.callback.start(currentSlide + 1, next + 1)
if @options.effect.fade.crossfade
# Fade out current slide to next slide
@@ -745,7 +762,7 @@
$.data this, "current", next
# End of the animation, call complete callback
- @options.callback.complete(next + 1)
+ @options.callback.complete(currentSlide + 1, next + 1)
)
else
# Fade to next slide
@@ -767,7 +784,7 @@
$.data this, "current", next
# End of the animation, call complete callback
- @options.callback.complete(next + 1)
+ @options.callback.complete(currentSlide + 1, next + 1)
)
# @_getVendorPrefix()
diff --git a/source/jquery.slides.js b/source/jquery.slides.js
index f5b2d27..d8e3624 100644
--- a/source/jquery.slides.js
+++ b/source/jquery.slides.js
@@ -1,6 +1,5 @@
-// Generated by CoffeeScript 1.6.1
+// Generated by CoffeeScript 1.6.3
(function() {
-
(function($, window, document) {
var Plugin, defaults, pluginName;
pluginName = "slidesjs";
@@ -41,7 +40,6 @@
}
};
Plugin = (function() {
-
function Plugin(element, options) {
this.element = element;
this.options = $.extend(true, {}, defaults, options);
@@ -54,12 +52,13 @@
})();
Plugin.prototype.init = function() {
- var $element, nextButton, pagination, playButton, prevButton, stopButton,
+ var $children, $element, nextButton, pagination, playButton, prevButton, stopButton,
_this = this;
$element = $(this.element);
+ $children = $element.children().not(".slidesjs-navigation", $element);
this.data = $.data(this);
$.data(this, "animating", false);
- $.data(this, "total", $element.children().not(".slidesjs-navigation", $element).length);
+ $.data(this, "total", $children.length);
$.data(this, "current", this.options.start - 1);
$.data(this, "vendorPrefix", this._getVendorPrefix());
if (typeof TouchEvent !== "undefined") {
@@ -69,7 +68,7 @@
$element.css({
overflow: "hidden"
});
- $element.slidesContainer = $element.children().not(".slidesjs-navigation", $element).wrapAll("