On Jan 29, 3:44 am, Mike Alsup <mal...@gmail.com> wrote: > > 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. > > The before and after callbacks are actually passed a 4th argument > which is a boolean flag. The value is true when the slideshow is > navigating forward and false when navigating backward.
Mike, thanks for your reply :) It's not clear to me how I would check on this value. Below is my new code, how would I actually code the "{booleanflag?!}" part? //init vars var initcount = 0; var imgcount = $('div#imgcontainer img').size(); //callback function function onAfter() { if({booleanflag?!}) { initcount++; if(initcount>imgcount) { initcount = 1; } } else { initcount--; if(initcount<1) { initcount = imgcount; } } $('div#controls span').html(initcount+'/'+imgcount); }