Downloading and including jQuery
Bootstrap is dependent on jQuery, so we have to download and include it before including boostrap.min.js
. So, download jQuery from http://jquery.com/download/.
The preceding URL takes us to the following screenshot:
We will use the compressed production Version 1.10.2.
Once you download jQuery, rename the file as jquery.min.js
and copy it into the js
skin folder at skin/frontend/bookstore/default/js/
.
In the same folder, also create the jquery.scripts.js
file, where we will insert our custom scripts.
Note
Magento uses Prototype as the main JavaScript library. To make jQuery work correctly without conflicts, you need to insert the no conflict code in the jquery.scripts.js
file, as shown in the following code:
// This is important! jQuery.noConflict(); jQuery(document).ready(function() { // Insert your scripts here });
The following is a quick recap of CSS and JS files: