From 20060ea29f46deae26dae63566df1d6f4114e9af Mon Sep 17 00:00:00 2001 From: Joel Walters Date: Wed, 6 Feb 2013 14:29:28 -0800 Subject: [PATCH] Set "this" to target slide. Fixes request in #42. --- responsiveslides.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/responsiveslides.js b/responsiveslides.js index 1e6f465..f8ac799 100644 --- a/responsiveslides.js +++ b/responsiveslides.js @@ -93,7 +93,7 @@ // Fading animation slideTo = function (idx) { - settings.before(); + settings.before.call($slide.eq(idx)); // If CSS3 transitions are supported if (supportsTransitions) { $slide @@ -104,7 +104,7 @@ .css(visible); index = idx; setTimeout(function () { - settings.after(); + settings.after.call($slide.eq(idx)); }, fadeTime); // If not, use jQuery fallback } else { @@ -121,7 +121,7 @@ $(this) .addClass(visibleClass) .css(visible); - settings.after(); + settings.after.call($slide.eq(idx)); index = idx; }); }