Site icon Sibeesh Passion

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]

Exit mobile version