Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #580931

    Hello!

    It implemented this code to defer parsing of javascript. Normally it works just fine.
    But now it messes with the mega menu. it moves the menu to the left.

    any ideas?

    function defer_parsing_of_js ( $url ) {
    if ( FALSE === strpos( $url, ‘.js’ ) ) return $url;
    if ( strpos( $url, ‘jquery.js’ ) ) return $url;
    return “$url.’ async onload=’myinit()”;
    }
    add_filter( ‘clean_url’, ‘defer_parsing_of_js’, 11, 1 );

    #581511

    Hi WolfvanHaeren,

    Not sure why but I’m guessing it’s causing some kind of conflict, what is the purpose of the code? I’m not what defer parsing means?

    Best regards,
    Rikard

    #581521

    It makes sure the javascript is loaded when it is being used and not all the javascript at once.
    It used to work fine.

    https://gtmetrix.com/defer-parsing-of-javascript.html

    #582028

    Hi,

    Ok, thanks for the info. I had a look at your mega menu but it looks alright to me. Could you post a screenshot of the problem please?

    Regards,
    Rikard

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