Opened 14 years ago
Closed 13 years ago
#4396 closed bug (fixed)
animateClass does nothing if there are no styles changes
Reported by: | mulhoon | Owned by: | Scott González |
---|---|---|---|
Priority: | major | Milestone: | 1.8 |
Component: | ui.effects.core | Version: | 1.7.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
three styles...
.content_1{color:#FFFFFF;} .content_2{color:#FF0000;} .content_3{color:#FFFFFF;}
Two of these classes have the same attributes which seems to be a problem. When swapping from content_1 to content_2 then content_3, then back to content_1. The final content_1 is not added it sticks on content_3 from then on.
But if I change it to this..
.content_1{color:#FFFFFF;} .content_2{color:#FF0000;} .content_3{color:#FF00FF;}
...everything is fine.
using this $("#content").switchClass('content_1','content_2', 1000);
Change History (5)
comment:1 Changed 14 years ago by
Component: | ui.core → effects.core |
---|
comment:2 Changed 14 years ago by
Milestone: | TBD → 1.8 |
---|
comment:3 Changed 14 years ago by
Priority: | minor → major |
---|---|
Summary: | switchClass to similar classes causes unexpected results → animateClass does nothing if there are no styles changes |
comment:4 Changed 13 years ago by
Owner: | set to scott.gonzalez |
---|---|
Status: | new → accepted |
Confirmed to be caused by passing an empty hash of properties to .animate(). Filed a ticket against jQuery.
I believe what happens if there are no properties to pass to .animate() so nothing happens (the classes don't even change).