jQuery Tutorial


jQuery Example


jQuery References


jQuery CSS toggleClass() Method Reference


  jQuery CSS method References


Uses

jQuery toggleClass() method toggles add or remove one or more class from selected elements.


Syntax

$(selector).toggleClass(classname)

jQuery toggleClass() method support following parameter.

Parameter Description
classname classname is Required parameter. remove one or all css class.

jQuery CSS toggleClass() method Example

<script type="text/javascript"> 
$(document).ready(function(){
  $("button").click(function(){
    $("p").toggleClass("param");
  });
});
<script>
Online Try This Code Your Self....   »

  jQuery CSS method References