Check if a class `active` exist on element with jquery April 12, 2024 by Tarik I think you want to use hasClass() $('li.menu').hasClass('active');