Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
117
rated 0 times [  120] [ 3]  / answers: 1 / hits: 16459  / 13 Years ago, tue, february 7, 2012, 12:00:00

Possible Duplicate:

Removing multiple classes (jQuery)






how can we remove multiple classes from one id with in one click.



I tried like this which doesn't work properly



$('.clearbtn_1').click(function(){
$('.valid_div1').removeClass('valid_tick','invalid_tick');
});

More From » jquery

 Answers
8

You can remove multiple classes at once by separating the classes by spaces like so :



$('.clearbtn_1').click(function(){
$('.valid_div1').removeClass('valid_tick invalid_tick');
});

[#87609] Sunday, February 5, 2012, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
josiah

Total Points: 208
Total Questions: 105
Total Answers: 107

Location: Seychelles
Member since Mon, Jun 28, 2021
3 Years ago
;