Adds the specified class(es) to each element in the set of matched elements.
$('div').addClass('active');
<div class="active"></div>
$('p').addClass('highlight bold text-center');
<p class="highlight bold text-center"></p>
$('span').addClass('visible').text('Hello');
<span class="visible">Hello</span>
| Parameter | Type | Description |
|---|---|---|
| className | string | One or more space-separated classes to be added to the class attribute of each matched element. |
Returns: The original SR object for chaining.