jQuery removeClass() method

The jQuery removeClass() method remove a single class, multiple classes, or all classes from each element in the set of matched elements.

Source Code

<!DOCTYPE html>
  <script src="http://code.jquery.com/jquery-latest.js"></script>
 	 .highlight { border : 2px solid #1E8CBE; }
<div class="div1 highlight">Div 1</div>
<div>Div 2</div>

<button>Click Here</button>

jQuery("button").click(function () {


Following example remove the “highlight” class from the div that contains ‘div1′ class.

Div 1
Div 2


No comments yet.

Leave a Reply