Tutorialsplane

jQuery addClass Method


jQuery addClass Method : is used to add class(es) to the selected elements.


jQuery addClass Method Syntax

$(selector).addClass(classname,function(index,currentClassName));

index: (Interger) Index of the current element in the current set.
currentClassName(String)Current Class name in the matching set.

jQuery addClass() Method Example 1

jQuery addClass() Method Example 2

Output

jQuery addClass Example

Jquery Tutorial

jQuery Effects

jQuery Traversing

jQuery HTML

jQuery Css

jQuery Scroll

jQuery Dimensions

jQuery Ajax