jQuery has been bundled with WordPress for some time now. But just because it’s bundled doesn’t mean it’s automatically loaded on your pages.
For example, I’ve been toying with the Bootstrap 3.0 navbar recently on a test site, and the navbar was working perfectly. When the site is compressed to under 768px wide, the horizontal navbar collapses into fancy dropdown stacked menu. Bootstrap uses jQuery for this.
(Yes, I’m also using a custom navigation walker to insert the required Bootstrap classes into the default menu html. Stay tuned for an article on how I did it. It was too easy!)
Everything was wonderful until I disabled a plugin on the site…a plugin that was conveniently loading jQeury for me. It took me a few minutes to figure out that the loss of jQuery was why my menu stopped working in collapsed mode.
wp_enqueue_script( ‘bootstrap-js’, get_template_directory_uri() . ‘/js/bootstrap.min.js’, array(‘jquery’));
Here is the WordPrexx Codex article on how to Link a Theme Script Which Depends on jQuery