I am using WP's local jQuery. All my own scripts are working fine! But bootstrap gives me this error message in the console: Uncaught Error: Bootstrap's JavaScript requires jQuery
.
How can I make bootstrap using WP's local jQuery?
I am using WP's local jQuery. All my own scripts are working fine! But bootstrap gives me this error message in the console: Uncaught Error: Bootstrap's JavaScript requires jQuery
.
How can I make bootstrap using WP's local jQuery?
Ideally, using WP methods to enqueue bootstrap JS dependencies you can just set jQuery as a requirement and WordPress will take care of the rest.
<?php wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/bootstrap/js/bootstrap.js', array( 'jquery' ) ); ?>