Support » Plugin: Responsive Photo Gallery - Images Gallery for WordPress » Wait for jQuery to load before running (solution enclosed)

  • I defer all scripts loading on my websites to improve initial page speed. This causes problems with plugins which use jQuery, such as this one, as it tries to use jQuery before it has loaded. There’s a simple fix for this, and I’d greatly appreciate it if you could update your plugin to accommodate this.

    In your inline scripts, instead of using jQuery(document).ready(function () { ... }), if you use document.addEventListener("DOMContentLoaded, function () { ... }), it will operate the same way, but without relying on jQuery. This would allow me to continue to defer scripts loading, without breaking this plugin.

    If you do add this in a future update, please let me know, so that I can adjust my theme accordingly.

    Alternatively, I’d be satisfied with a simple filter added to the inline scripts, as that would allow me to insert this code myself.

Viewing 1 replies (of 1 total)
  • Plugin Author GrandWP


    Dear @revxx14 ,

    Thank you for your solution.
    We will review it to add to one of our upcoming update releases.
    Hope this helps,
    If any help needed, let me know

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.