Can’t find variable: jQuery
-
To optimize the website, all JS scripts (including jQuery) are moved to the footer. However, there is a problem in the console for the plugin because HTML code with JavaScript script in jQuery is added too early.
I think this script will help reproduce the problem:
add_action( 'wp_enqueue_scripts', static function () { wp_deregister_script( 'jquery' ); wp_register_script( 'jquery', includes_url( '/js/jquery/jquery.min.js' ), [], '3.6.4', true ); }, 20 );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Can’t find variable: jQuery’ is closed to new replies.