jQuery > Attribute related method

.removeClass() - remove class from element in jQuery

How to remove CSS class from an element in jQuery?


To remove a css class from an element, removeClass() method can be used.

<script>
      $("#div2").removeClass("class1");
  </script>

Above code snippet will remove the class “class1” from the element whose id is “div2”.

 Views: 4622 | Post Order: 35



Write for us






Hosting Recommendations