Bug Tracker

Opened 11 years ago

Last modified 11 years ago

#9390 closed feature

Add swapClass Method — at Version 3

Reported by: [email protected] Owned by:
Priority: low Milestone: 1.7
Component: attributes Version: 1.6.1
Keywords: 1.7-discuss Cc:
Blocked by: Blocking:

Description (last modified by Rick Waldron)


There were times when I needed a class swap, of couse it can be achieved by removing the current class and adding the new one, but a swap method native to jquery would be nice.

Something like $( 'div' ).swapClass( currentValue, newValue );

Anyway, keep the great work on JQuery. Thanks for developing it.

Ricardo Manenti

Change History (3)

comment:1 Changed 11 years ago by john

Type: bugfeature

comment:2 Changed 11 years ago by john

Keywords: 1.7-discuss added

Nominating ticket for 1.7 discussion.

comment:3 Changed 11 years ago by Rick Waldron

Description: modified (diff)

-1, A creative use of toggleClass is sufficient.

Note: See TracTickets for help on using tickets.