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