jQuery Minute™

…a jQuery Minute™ later and you're done!

addClass() removeClass()

without comments

If you have to add or remove multiple classes with jQuery, the most efficient way is to separate the classes with a space and make one call.

Such as:

$('body').addClass('abc def');

As opposed to:


Written by jdsharp

December 11th, 2007 at 12:22 pm

Leave a Reply