[Support request] Defer Javascript Element Conflict

Home Forums Support [Support request] Defer Javascript Element Conflict

Home Forums Support Defer Javascript Element Conflict

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

    I have a custom calculator I made with jQuery that has worked great until Siteground added “Defer Render Blocking JS” as a setting to their SG Optimizer Plugin.

    The jQuery I coded is inserted into one post using the elements feature in Generate Press. It currently goes in the ‘wp_footer’ hook.

    When I have the render blocking setting turned off in the SG Optimizer Plugin it works fine, and does not work at all when I turn it on. When turned on it gives a console error that it doesn’t recognize ‘jQuery’ function, so I am assuming it is not loading jQuery before the element’s code.

    Is there a way I can get these two things to play together? I would like to have it turned on but open to other ideas.

    #1052215
    David
    Staff
    Customer Support

    Hi there,

    we see quite a few issues raised that are related to SG Optimizer messing with the order of things. We recommend autoptimize as its less prone to this – tips here:

    https://generatepress.com/fastest-wordpress-theme/

    Try that and if that works then the issue is SG plugin messing things around.

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