Tag Archives: jquery addclass
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