Skip to main content

Bug Tracker

Side navigation

#9390 closed feature (wontfix)

Opened May 22, 2011 07:09PM UTC

Closed June 07, 2011 06:53PM UTC

Add swapClass Method

Reported by: rmanenti@gmail.com Owned by:
Priority: low Milestone: 1.7
Component: attributes Version: 1.6.1
Keywords: 1.7-discuss Cc:
Blocked by: Blocking:
Description

Hello,

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

Attachments (0)
Change History (12)

Changed May 22, 2011 07:09PM UTC by john comment:1

type: bugfeature

Changed May 22, 2011 07:27PM UTC by john comment:2

keywords: → 1.7-discuss

Nominating ticket for 1.7 discussion.

Changed May 22, 2011 08:34PM UTC by rwaldron comment:3

description: Hello, \ \ 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 ManentiHello,\ \ 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

-1, A creative use of toggleClass is sufficient.

Changed May 23, 2011 01:03AM UTC by jaubourg comment:4

-1,

Changed May 23, 2011 05:04AM UTC by timmywil comment:5

-1, creep

Changed May 23, 2011 05:06AM UTC by timmywil comment:6

component: unfiledattributes
description: Hello,\ \ 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 ManentiHello, \ \ 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
priority: undecidedlow
status: newopen

um, that wasn't me calling anyone names. creep = feature creep

Changed May 23, 2011 04:31PM UTC by paul.irish comment:7

-1, toggleClass can do this

Changed May 24, 2011 10:21PM UTC by dmethvin comment:8

-1, lol@timmywill, the creep

Changed June 03, 2011 02:10PM UTC by john comment:9

description: Hello, \ \ 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 ManentiHello,\ \ 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

-1, Plugin.

Changed June 05, 2011 10:28PM UTC by ajpiano comment:10

description: Hello,\ \ 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 ManentiHello, \ \ 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

-1, toggleClass, toggleClass, step right up and toggleClass...

Changed June 06, 2011 03:28PM UTC by scottgonzalez comment:11

description: Hello, \ \ 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 ManentiHello,\ \ 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

-1

Changed June 07, 2011 06:53PM UTC by rwaldron comment:12

milestone: 1.next1.7
resolution: → wontfix
status: openclosed

Closing per 1.7 roadmap meeting resolution