• Resolved snippet24

    (@snippet24)


    I can’t seem to figure out how to make it work with this plugin in theory I could just defer jquery and defer the envira gallery libraries… even if I set jquery to be excluded the lightbox is not loading and I’m getting : jQuery is not defined. What I am doing wrong or not doing?

    • This topic was modified 2 years, 11 months ago by snippet24.

    The page I need help with: [log in to see the link]

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    I had a look at the HTML source and jQuery is still deferred, can you make sure that it is excluded from being deferred/ asynced to begin with?

    Thread Starter snippet24

    (@snippet24)

    Yes, done. Oh and perhaps important these are the deferred scripts:
    js/jquery/jquery.js, jquery-1.12.4.min.js, script-aniview-init.js, jquery.aniview.js, wp-content/themes/otzerling/scripts.js, isotope.js ,enviratope-item.js, envira-min.js
    Edit: I will remove this as well from deferred
    js/jquery/jquery.js

    • This reply was modified 2 years, 11 months ago by snippet24.
    • This reply was modified 2 years, 11 months ago by snippet24.
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    in asyncjs you can exclude by plugin, can try you excluding the whole of envira-gallery-lite that way?

    Thread Starter snippet24

    (@snippet24)

    Thank you! that and having jquery excluded fixes the issues, but theres’ no chance to defer everything jquery and the whole envira plugin?

    • This reply was modified 2 years, 11 months ago by snippet24.
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    the only way to do (try) that would be to go to AO’s settings and opt for “don’t aggregate but defer” + “also defer inline JS” in which case many (all?) of the exclusions in AO can be removed and AsyncJS _should_ not be needed any more.

    Thread Starter snippet24

    (@snippet24)

    thank you so much!! I’m testing what makes turns out to be the best for performance, marking as resolved.

    Thread Starter snippet24

    (@snippet24)

    One last question: I reverted main to AOs settings, and in Async JS, set exclude for jquery and plugin exclusion for envira gallery but currently is not loading envira… disabling Async JS plugin restores the envira gallery

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    what JS errors did you get on the browser console?

    Thread Starter snippet24

    (@snippet24)

    Ok re-enabled Async JS, the error is: Uncaught ReferenceError: jQuery is not defined

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    that’s because jquery (the WordPress core one) is now aggregated by AO so the AsyncJS config for it is useless, you’ll have to exclude it in AO again in this setup ??

    Thread Starter snippet24

    (@snippet24)

    Ahhh I see, thank you as usual frank!! Have a nice weekend ??

    • This reply was modified 2 years, 11 months ago by snippet24.
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    you too ??

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘trying to make it work with Envira gallery lite plugin’ is closed to new replies.