Описание тега addclass

NoneAddClass is a method on jQuery objects that adds a CSS class to the selected elements.

addClass is a method on jQuery objects that adds a CSS class to the selected elements. Unlike setting className, addClass will not remove any existing classes.

Example

To select all paragraphs that are the first child of the parent and add the first class to them:

$('p:first-child').addClass('first');

Further reading