Mobile Menu :: Slide In Menu :: Clickable Parent Links - kary4/divituts GitHub Wiki

this code makes the parent links clickable but if you click the arrows it will open the sub items:

<script>
(function($){    
      $('body.et_header_style_fullscreen .et_mobile_menu').on( 'click', 'a', function(event) {
        // if we're clicking on the arrow - don't do anything
        if ( event.target.nodeName.toLowerCase() === 'span' ) {
            return;
        }
            
        // if we're clicking on the link and it contains the arrow - open the link URL 
        if ( $(this).find('span.et_mobile_menu_arrow') ) {
            window.location.replace( $(this).attr('href') );
            
            return false;
        }
    });     
})(jQuery);
</script>
⚠️ **GitHub.com Fallback** ⚠️