Remove specific class from all elements - jQuery

Code first, talks later

$(".class-name").removeClass("class-name");

In the above code, we are finding all the elements that do have the class and removing it.

Story behind this post

Today my colleague asked me whether they can remove some specific class from whole elements who do have the class. Not just that, this has to be done only on mobile devices (post about Determine if the user is on the mobile device is coming next). This post is to make his day a little easier.

Update:

The post Determine if the user is on the mobile device is live now.


comments powered by Disqus

About the author

  • Abhith Rajan

    Abhith Rajan

    Abhith Rajan is a full-stack developer, consultant, Sysberries employee, and biker. Who passionate about C# and JavaScript. Works on his blog, his personal finance web app and its react native mobile app in his free time.

    Buy me a coffeeBuy me a coffee