#8113 closed bug (fixed)
addClass not animating
Reported by: | quasipickle | Owned by: | quasipickle |
---|---|---|---|
Priority: | minor | Milestone: | 1.8.19 |
Component: | ui.effects.core | Version: | 1.8.17 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Calling addClass() with a second parameter does not animate the style change, unless the element has a "class" attribute.
Example: http://jsfiddle.net/Z6mJU/108/ (Note: jsFiddle only has v1.8.16, but I'm experiencing the problem with 1.8.17, it's just not demonstrable via jsFiddle)
Affected jQueryUI versions: 1.8.17 (running the above Fiddle with v1.8.9 and v1.8.7 do work, so I'm guessing this is a regression?
Browsers tested: Firefox 9.0.1, Chrome 17
OS tested: OS X
Expected results: all animate-able properties of the class to be added, get animated in over the provided duration.
Encountered results: Without a "class" attribute, the class gets added immediately - just as it would with the default jQuery addClass() function.
Change History (10)
comment:2 Changed 11 years ago by
Status: | pending → open |
---|
Confirmed. The test case is as easy as it sounds.
comment:3 follow-up: 4 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | open → closed |
This works fine in master: http://jsfiddle.net/Z6mJU/110/
comment:4 Changed 11 years ago by
Replying to scott.gonzalez:
This works fine in master: http://jsfiddle.net/Z6mJU/110/
Unfortunately, that's not accurate. In that fiddle, JQueryUI isn't loaded. Loading JQueryUI reproduces the problem.
This modification of that fiddle better represents the problem, and also includes a workaround which itself demonstrates the problem: http://jsfiddle.net/Z6mJU/144/
With JQueryUI enabled, the first div--which has no class attribute in the HTML--doesn't animate, but jumps directly to the applied class.
The second div--which has a class attribute--does animate as intended.
By adding a dummy class to the third (and thus establishing a class attribute) before adding the animated addClass call, the animation applies as intended.
comment:5 follow-up: 6 Changed 11 years ago by
Actually, jQuery UI is loaded in my fiddle. I have no idea why you think it's not. What do you think is causing the animation if jQuery UI is not loaded? All you've done in your fiddle is go back to using jQuery UI 1.8.16, which I've confirmed is broken.
comment:6 Changed 11 years ago by
Replying to scott.gonzalez:
Actually, jQuery UI is loaded in my fiddle. I have no idea why you think it's not. What do you think is causing the animation if jQuery UI is not loaded? All you've done in your fiddle is go back to using jQuery UI 1.8.16, which I've confirmed is broken.
I was just coming back to say this, because I am obviously an idiot. Sorry about this.
comment:8 Changed 11 years ago by
Effects: Backporting e8ba367 to 1-8-stable - Fixes #8113 - addClass not animating
Changeset: e220cf2a7dc709fdbbdfeacbb29378e005a0afd8
comment:9 Changed 11 years ago by
Milestone: | 1.9 → 1.8.19 |
---|
Should be fixed in next 1.8 release (1.8.19)