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

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
主站蜘蛛池模板: 锦州市| 远安县| 体育| 友谊县| 郓城县| 嘉定区| 江城| 城步| 六盘水市| 青州市| 中卫市| 桐梓县| 西畴县| 莱芜市| 正镶白旗| 中江县| 囊谦县| 章丘市| 伊宁县| 德州市| 鹿泉市| 乌拉特中旗| 施甸县| 民和| 樟树市| 波密县| 莱西市| 洮南市| 吉隆县| 鱼台县| 拉萨市| 长沙县| 巫山县| 社旗县| 阿瓦提县| 东港市| 昭通市| 南通市| 桐梓县| 清原| 灵石县|