Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author SilkyPress

    (@diana_burduja)

    Hello Roger,

    on your website the jQuery library is loaded in the footer after the point at which at Simple Custom CSS & JS plugin can add the custom JS code. This is rather unusual, but it can happen in a certain theme/plugins configuration.

    But, since your custom JS code is rather simple, you can also rewrite it into plain JavaScript that doesn’t require the jQuery library. For example, if you replace the entire JS code with the following:

    document.getElementById("btn-back").onclick = function() {
        window.history.go(-1); 
        return false;
    };

    then the “back” button JS action should work alright.

    Thread Starter rogeriodec

    (@rogeriodec)

    At first, I replaced the previous code with your code in the footer, but it didn’t work.
    Only later did I realize (as a layman) that the code needed to be between the <script> tags…
    Now it works.
    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Uncaught ReferenceError: jQuery is not defined’ is closed to new replies.