Skip to content
This repository

Flip toggle switches don't animate when tapped. #2346

Closed
jblas opened this Issue August 26, 2011 · 2 comments

1 participant

Kin Blas
Kin Blas

The flip toggle switches used to animate when you tapped/toggled them. It seems this checkin:

https://github.com/jquery/jquery-mobile/commit/2dea6cd721d1ca85d3f3e6d6e7b931434004b35a#js/jquery.mobile.forms.slider.js

broke this because it sets the value (via refresh) prior to the animation being set up.

I have a fix for this.

Kin Blas

The fix for this is on the 'transitions' branch and can be found here:

https://github.com/jquery/jquery-mobile/commit/31f61e59bc7f06ea3f01bc3a19a1a94f80268841#js/jquery.mobile.forms.slider.js

It can land on the HEAD once the $.fn.transitionComplete() method lands from the 'transitions' branch.

Kin Blas

I landed the selector fix to enable animation on the HEAD:

a27f7d3

Also landed a related fix that removed the bogus animationComplete() call. This was not necessary since an animationend event will never be generated for a CSS3 transition, and was leading to us binding a new handler every time the switch was clicked.

7bf048a

Kin Blas jblas closed this September 01, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.