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

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
主站蜘蛛池模板: 新干县| 讷河市| 陕西省| 额济纳旗| 桃园市| 保康县| 汉中市| 天全县| 通榆县| 灌云县| 阿图什市| 广汉市| 尖扎县| 靖州| 娄底市| 吉安市| 博湖县| 龙门县| 平安县| 如东县| 荆门市| 精河县| 安陆市| 托里县| 云和县| 叙永县| 沙雅县| 师宗县| 通化市| 乡城县| 吉隆县| 曲水县| 崇信县| 玉门市| 华阴市| 故城县| 波密县| 台湾省| 贺兰县| 永顺县| 恩施市|