Ticket #4396 (closed bug: fixed)
animateClass does nothing if there are no styles changes
| Reported by: | mulhoon | Owned by: | scott.gonzalez |
|---|---|---|---|
| Priority: | major | Milestone: | 1.8 |
| Component: | ui.effects.core | Version: | 1.7.1 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
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
comment:3 Changed 4 years ago by scott.gonzalez
- Priority changed from minor to major
- Summary changed from switchClass to similar classes causes unexpected results to animateClass does nothing if there are no styles changes
I believe what happens if there are no properties to pass to .animate() so nothing happens (the classes don't even change).
comment:4 Changed 4 years ago by scott.gonzalez
- Owner set to scott.gonzalez
- Status changed from new to accepted
Confirmed to be caused by passing an empty hash of properties to .animate(). Filed a ticket against jQuery.

