HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
jQuery HTML/CSS Methods : Add a class name to the first <p> element
The addClass() method adds one or more class names to the selected elements.
This method does not remove existing class attributes, it only adds one or more class names to the class attribute.
Parameter | Description |
---|---|
classname | Required. Specifies one or more class names to be added |
function(index,currentclass) | Optional. Specifies a function that returns one or more class names to be added
|