Opened 7 weeks ago

Closed 7 days ago

#15123 closed bug

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');

Change History (2)

comment:1 Changed 7 weeks ago by scottgonzalez

  • Component changed from ui.core to ui.effects.core
  • Owner set to diegoperl
  • Status changed from new to pending

Please explain why such a call should be considered valid input.

comment:2 Changed 7 days ago by trac

  • Status changed from pending to 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.

Note: See TracTickets for help on using tickets.