Features of working with the hasClass method in jQuery
The last class handling method we should mention is called hasClass. It checks for the presence or absence of the class passed to it as a parameter. If the element has such a class, it will output true, and if it doesn't, it will output false.
Let's say we have the following HTML code:
<p id="test" class="www eee">text</p>
Let's check if the paragraph has the class eee:
alert( $('#test').hasClass('eee') );
Check that at least one of the links has the class www.