> $(function(){ > $(slideShow).cycle({ > timeout: 0, > speed: 500, > fx: 'fade', > prev: slideShow + '_prev', > next: slideShow + '_next', > before: function() { > var currentSlide = '?'; > var countTotal = $(slideShow).children().size(); > var countDisplay = slideShow + '_current'; > $(countDisplay).html(currentSlide + " of " + countTotal > + " > images"); > } > }); > });
Try this: before: function (curr, next, opts) { ... $(countDisplay).html(opts.nextSlide + " of " + opts.slideCount + " images"); }