官术网_书友最值得收藏!

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:

Downloading and including jQuery

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:

Downloading and including jQuery
主站蜘蛛池模板: 霍山县| 迭部县| 乐亭县| 太仓市| 清水县| 河曲县| 宜良县| 宁晋县| 建昌县| 柞水县| 定日县| 区。| 桃园县| 冀州市| 呼图壁县| 府谷县| 华容县| 确山县| 含山县| 高淳县| 平阴县| 诸城市| 隆林| 璧山县| 宝丰县| 桦川县| 无极县| 新宁县| 三原县| 西峡县| 南和县| 温州市| 北碚区| 漳州市| 鄂尔多斯市| 循化| 黄山市| 司法| 平果县| 阿合奇县| 邹平县|