SIndhu
SIndhu

Reputation: 687

How do I remove a class from the entire document

I tried $(document).removeClass("myClassname") but it doesn't seem to work.

Upvotes: 9

Views: 15493

Answers (2)

ShankarSangoli
ShankarSangoli

Reputation: 69905

I think you are looking for this. It will select all the elements with class myClassname and remove that class for those elements.

$('.myClassname').removeClass('myClassname');

Upvotes: 9

villecoder
villecoder

Reputation: 13483

$(".myClassname").removeClass("myClassname")

$(".myClassname") will match all elements that have the class myClassname.

Upvotes: 48

Related Questions