Few days ago I spent almost 30min figuring out what on earth was wrong this event toggleClass,hasClass ,$(this). As the code seem to be fine. $(".s_nav_menu").on('click', ()=> { if( $(this).parent().next('div').hasClass('p_t_tap_inner')){ $(this).parent().toggleClass( "on" ); } }); after checking the debug tools, I realized the if statement returns false. This is not beca..