Posted: 5/21/2010
Hi friends ,
I know how to use selector.removeClass('className') to remove a particular class from a selector, but I want to remove all the classes and I am unable to find anything like
.removeAllClass in jquery. How can remove all the classes ?
Posted: 5/22/2010
kevin said: Hi friends , I know how to use selector.removeClass('className') to remove a particular class from a selector, but I want to remove all the classes and I am unable to find anything like.removeAllClass in jquery. How can remove all the classes ?
Hi kevin,
you can use below code to remove all css from the page.
<script type="text/javascript"> $(function() { $("#removeAllCss").click(function() { $('link[rel=stylesheet]').remove(); }); }); </script>
hope this will help you.
You already have the solution in your question just remove the class name selector.removeClass()