The addclass() method is used to add one or more class name to the selected element. This method is used only to add one or more class names to the class attributes not to remove the existing class attributes.
If you want to add more than one class separate the class names with spaces.
Parameters of jQuery addClass() method
Example of jQuery addClass() method
Let?s take an example to demonstrate the effect of jQuery addclass() method:Test it Now
JavaTpoint offers too many high quality services. Mail us on h[email protected], to get more information about given services.
JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected].
Duration: 1 week to 2 week