how to check if a element contains :active selector code example Example: check if class is active jquery $('li.menu').hasClass('active');