tl  tr
  Home | Tutorials | Articles | Videos | Products | Tools | Search
Interviews | Open Source | Tag Cloud | Follow Us | Bookmark | Contact   
 Articles > jQuery > How to remove all CSS classes in jQuery

How to remove all CSS classes in jQuery

Author: Venkata Sudhakar

The below example shows how to remove all CSS classes in jQuery.

01<div id="title" class="bold italic red">BE THE CODER</div>
02 
03//Remove a single Class
04$("#title").removeClass('bold');
05$("#title").removeClass('italic');
06 
07//Remove multiple classes by providing space-separated class names
08$("#title").removeClass('bold italic');
09$("#title").removeClass('bold red');
10$("#title").removeClass('bold italic red');
11 
12//Remove all CSS classes by calling 'removeClass' without any parameters
13$("#title").removeClass();

 
  


  
bl  br