Hi all, I'm building a slideshow in HTML and the cycle plugin helps me out with making it look smooth. My slideshow has manual controls, it has previous and next anchors to go back and forth the slides. This all works, no sweat.
However I also have a counter which indicates at which slide you are. Starts with 1 and with a click of next it should go +1 and with a click of previous it should go -1. I've set this up with making use of the after callback, so that a function increments the counter with 1 after the transition is complete, easy enough too. But what now happens is that +1 occurs every time a slide passes by whether you go back or forth, it doesn't matter. Whereas this should be -1 when you click previous and +1 when you click next. Is there a way to let the function know it should add up or distract? The documentation says that the before and after callback methods are passed three arguments: 1. the DOM element for the slide that is being transitioned in (same as this) 2. the DOM element for the slide that is being transitioned out 3. the options object my guess is that should help, but it's not too well documented how this works or what a code example of this would be. Any thoughts?