if class is active then active another class jquery code example Example: check if class is active jquery $('li.menu').hasClass('active');