Fastest Web Hosting

how can remove multiple classes jquery

0 votes
asked Aug 27, 2016 in Jquery by rajatinsa (3,350 points)
edited Aug 27, 2016 by admin

Any better way to rewrite this:

$('element').removeClass('class1').removeClass('class2');

Can't use removeClass(); as it would remove ALL classes, which I don't want.

Thanks

1 Answer

0 votes
answered Sep 16, 2016 by arifshabbir (460 points)

$($element).removeClass("class-a class-b class-c");

Job Board

TechnicalSharp is a technical community of developers where they are sharing their knowledge and solutions and against it they are getting the score point which help them to make profile strong which is under eyes on MNC's
...