Search and Top Navigation
#15123 closed bug ()
Opened January 05, 2017 08:42AM UTC
Closed February 15, 2017 06:42AM UTC
switchClass method removes the class if the toAddClass equals to toRemoveClass
Reported by: | diegoperl | Owned by: | diegoperl |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.effects.core | Version: | 1.12.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
In the bellow block, an element has class 'class1'
if I call switchClass on that element and both "classtoRemove" and "classToAdd" are the same then the class is removed. probably because jquery first add the class and then removes it.
I would expect jquery first to remove the classes and then to add so it won't remove totally the class if both arguments are the same
<div id='myEl' class='class1'></div> $('#myEl').switchClass('class1', 'class1');
Attachments (0)
Change History (2)
Changed January 05, 2017 02:03PM UTC by comment:1
component: | ui.core → ui.effects.core |
---|---|
owner: | → diegoperl |
status: | new → pending |
Changed February 15, 2017 06:42AM UTC by comment:2
status: | pending → closed |
---|
This ticket was closed automatically by the system. It was previously set to a Pending status and hasn't been updated within 14 days.
Please explain why such a call should be considered valid input.