• Resolved mattaus03

    (@mattaus03)


    Hi,

    Activating Autoptimize has really helped my website speed; however I have a FAQ section on my site that uses drop down toggle text (i.e. click on a FAQ and then the text appears underneath, click it again and it disappears – pretty standard).

    It seems to be an issue with the Javascript Options; as I can keep the Autoptimize CSS Options and HTML Options activated, but as soon as I try to activate the Javascript Option I run into trouble.

    I’ve tried selecting ‘Force JavaScript in <head>?’ and ‘Add try-catch wrapping?’ just to see if that did anything; but it didn’t -> as soon as I select ‘Aggregate JS-files?’ I get the error.

    I have gone hunting around all over the place trying to find the specific javascript causing the problem so that I could add it to ‘Exclude scripts from Autoptimize:’; but my trial and error approach has not worked. My default exclude scripts list includes the following: wp-includes/js/dist/, wp-includes/js/tinymce/, js/jquery/jquery.js, js/jquery/jquery.min.js

    If I try debugging the error from console, I get the following:

    Uncaught ReferenceError: jQuery is not defined (autoptimize_1cfcbc72a2417d8f150b7780e93f71b2.js:5)
    at Function.u.extend (autoptimize_1cfcbc72a2417d8f150b7780e93f71b2.js:5)
    at Object.c.widgetsTypes (autoptimize_1cfcbc72a2417d8f150b7780e93f71b2.js:5)
    at __webpack_require__ (autoptimize_1cfcbc72a2417d8f150b7780e93f71b2.js:5)
    at Object.c.widgetsTypes (autoptimize_1cfcbc72a2417d8f150b7780e93f71b2.js:5)
    at __webpack_require__ (autoptimize_1cfcbc72a2417d8f150b7780e93f71b2.js:5)
    at Object.<anonymous> (autoptimize_1cfcbc72a2417d8f150b7780e93f71b2.js:5)
    at __webpack_require__ (autoptimize_1cfcbc72a2417d8f150b7780e93f71b2.js:5)
    at autoptimize_1cfcbc72a2417d8f150b7780e93f71b2.js:5
    at autoptimize_1cfcbc72a2417d8f150b7780e93f71b2.js:5

    Any clues as to what is going on here? Any help much appreciated.

    Matt

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Javascript issue with drop down toggle text’ is closed to new replies.