Using the before callback

Using the before callback

Hi there,

I am looking to create a slideshow for my portfolio site similar to this:
  1. http://jquery.malsup.com/cycle/count2.html

I would ideally like to have the animation quite slow, but doing this looks a little clunky as the slide count number is changed using the after callback, so a smooth transition is followed by the text laging behind. Ideally, the text would change immediately, followed by the transition.

This is the code from the sample page:

  1. function onAfter(curr,next,opts) {
  2.     var caption = 'Image ' + (opts.currSlide + 1) + ' of ' + opts.slideCount;
  3.     $('#caption').html(caption);
  4.     var number = (opts.slideCount)
  5. }

Is there anyway to change the slide number using the before callback? I've tried fiddling a little, but simply changing after to before doesnt work right...

I am new to this, so any help would be hugely appreciated

Thanks!