Search and Top Navigation
#8113 closed bug (fixed)
Opened February 09, 2012 11:38PM UTC
Closed February 12, 2012 08:42PM UTC
Last modified May 25, 2012 02:55AM UTC
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.
Attachments (0)
Change History (10)
Changed February 10, 2012 03:24AM UTC by comment:1
owner: | → quasipickle |
---|---|
status: | new → pending |
Changed February 10, 2012 03:27AM UTC by comment:2
status: | pending → open |
---|
Confirmed. The test case is as easy as it sounds.
Changed February 12, 2012 08:42PM UTC by comment:3
resolution: | → fixed |
---|---|
status: | open → closed |
This works fine in master: http://jsfiddle.net/Z6mJU/110/
Changed February 19, 2012 01:34AM UTC by comment:4
Replying to [comment:3 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.
Changed February 19, 2012 02:42AM UTC by comment:5
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.
Changed February 19, 2012 04:07AM UTC by comment:6
Replying to [comment:5 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.
Changed March 27, 2012 07:22PM UTC by comment:8
Effects: Backporting e8ba367 to 1-8-stable - Fixes #8113 - addClass not animating
Changeset: e220cf2a7dc709fdbbdfeacbb29378e005a0afd8
Changed March 27, 2012 07:24PM UTC by comment:9
milestone: | 1.9 → 1.8.19 |
---|
Should be fixed in next 1.8 release (1.8.19)
Changed May 25, 2012 02:55AM UTC by comment:10
#7952 is a duplicate of this ticket.
The linked fiddle doesn't exist.