how to check if li has active class in jquery code example Example: check if class is active jquery $('li.menu').hasClass('active');