Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1316556

    Dear Support,

    Which scripts are there for loading the mega menu?
    I want to check the loading sequence and how can I improve something for loading. I use WP rocket and we can exclude files.

    The mega menu is loading relative late, but should load early to have a fast interactivity; above the fold.

    I have this behavior of my mega menu (PS: You can take a look, if this also a perspective for a new modern mega menu style for enfold (also mobile)

    Best regards

    S.

    • This topic was modified 2 years, 8 months ago by Hokuspokus.
    #1317282

    Hey S.,

    Thank you for the inquiry.

    You can find the mega menu script in the themes/enfold/js/avia-snippet-megamenu.js file. It is registered in the functions.php file around line 486, handle is “avia-megamenu”.

    //mega menu inclusion (only necessary with sub menu items)
    		$condition = ( avia_get_submenu_count('avia') > 0 );
    		avia_enqueue_script_conditionally( $condition , 'avia-megamenu', $template_url . '/js/avia-snippet-megamenu.js', array( 'avia-default' ), $vn, true );
    

    Best regards,
    Ismael

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.