jQuery Tutorial


jQuery Example


jQuery References


jQuery CSS addClass() Method Reference


  jQuery CSS method References


Uses

jQuery CSS addClass() method add one or more CSS class to selected elements.


Syntax

$(selector).addClass(classname)

jQuery addClass() effect supported following parameters.

ParameterDescription
classnameclassname is Required parameter. add one or more css class names.

jQuery css addClass() method Example

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

  jQuery CSS method References