cycle2 icon indicating copy to clipboard operation
cycle2 copied to clipboard

Feature: Add active class at beginning of transition

Open shaunmorrison opened this issue 14 years ago • 6 comments

Move the assignation of the active class to when the transition starts. At the moment the active class becomes assigned after the the transition has completed – which can look not so smooth.

I have a carousel nav that controls a slideshow and when an item in the carousel is clicked I think the user will expect the state to change then not when the transition has completed.

I looked at the code, but I couldn't seem to switch the order of opts.API.updateView(); without breaking the active class totally.

I hope that makes sense?

Many thanks, Shaun

shaunmorrison avatar Nov 23 '12 18:11 shaunmorrison

You can now control when updateView is invoked.

http://jquery.malsup.com/cycle2/api/#update-view

malsup avatar Nov 25 '12 22:11 malsup

Reverted this feature since it broke a few things. Need to give this some more thought.

malsup avatar Nov 25 '12 23:11 malsup

Ok, have it working now.

malsup avatar Nov 25 '12 23:11 malsup

Works perfectly. Thank you for including it!

shaunmorrison avatar Nov 27 '12 09:11 shaunmorrison

Hi There,

I'm just picking up on this thread as it's exactly the functionality i'm looking for. Is there an example or you you direct to to how i can achieve this with the API?

Many thanks

randalldon avatar Nov 04 '13 11:11 randalldon

Apologies, i've just seen in the documentation how to achieve this.

randalldon avatar Nov 04 '13 11:11 randalldon