Jquery

jQuery Intro

jQuery Intro Quiz

jQuery Intro Exercise

jQuery Basic

jQuery Basic Quiz

jQuery Basic Exercise

jQuery Advance

jQuery Advance Quiz

jQuery Advance Exercise

jQuery Selectors

jQuery Effects

jQuery Events

jQuery Methods and Properties

jQuery Traversing

jQuery CSS and HTML Methods

jQuery hasClass() Method

jQuery hasClass() Method

 

 

The hasClass() method is used to check if any of the selected elements have a specified class name. If the class is present with the same name, then it will return true otherwise false.

 

Syntax:-

 

Its syntax is:- $(selector).hasClass(classname)

 

Further Explanation:-

 

Parameter Description
classname Required. Specifies the class name to search for in the selected elements

Code Explanation

All Tutorials related to jQuery CSS and HTML Methods

All Sections related to Jquery