How to check an element has particular css class or not

How to check an element has particular css class or not.
[js]
if ($(‘#myElem’).hasClass(‘myClass’)) {
alert(‘Has class’);
}
[/js]

Leave a Reply

Your email address will not be published. Required fields are marked *

Serverless 360