Support » Plugin: WP-Optimize - Cache, Clean, Compress. » Issue with JS minification after updating to 3.1.9

  • Resolved Leandro

    (@leandroprz)


    I’m using this code

    (function($) {
        $(function () {
            $('.panel-active .panel-title a').trigger('click');
        });
    })(jQuery);

    to automatically close an accordion shortcode created by my theme on page load, but after updating to 3.1.9 it stopped working.

    I’m excluding this file from being minified and after checking my browser’s debugger I can see that it is in fact being excluded, but somehow the minification is affecting the above piece of code I have in that file.

    Is it possible that maybe there’s another plugin setting that’s causing the issue?

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Harshad

    (@bornforphp)

    @leandroprz Can you please try to disable other plugins one by one and check if the code works after disabling other plugins?

    Thread Starter Leandro

    (@leandroprz)

    I disabled all my plugins and the issue was still there, so I did some more testing with WP-Optimize settings and found out that the issue has to do with the “Defer JavaScript” setting.

    Before updating to v3.1.9 I had enabled “Defer all the JavaScript files > Use the “defer” html attribute” and everything was working fine. Now that setting breaks the above code.

    So if I change the setting to “Defer selected JavaScript files” the shortcode works fine again. But I’m not adding any script into the box, so it is doing nothing from what I understand.

    Plugin Support Harshad

    (@bornforphp)

    @leandroprz Can you please try to turn of Minify JS from WP-Optimize > Minify > JS and check if it helps to fix the issue?

    Also having a problem with Minify since the last update..posted another topic entitled fonts

    Thread Starter Leandro

    (@leandroprz)

    @bornforphp sorry for the late reply, I didn’t get a notification from the forum.

    That didn’t solve the issue so I just changed the setting to “Defer selected JavaScript files” for now.

    Plugin Support Harshad

    (@bornforphp)

    @leandroprz We are working on this and the fix will be available in the next release.

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