malsup / cycle2

2nd gen cycling
899 stars 236 forks source link

How do I get currSlide index in a :before? #830

Open FreeXenon opened 6 years ago

FreeXenon commented 6 years ago

How do I get currSlide index in a :before? I am using the current code to update an HTML5 progress bar:

$("#Court-Schedules").cycle({
        before  : $('#Main-Progress').attr('value', $(this).attr('data-cycle-currSlide') * incrProgress),
        fx      : 'fade',
        speed   : intFadeSec,
        timeout : intDelaySec,
        slides  : '> section',
    });