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

  • Mastering jQuery UI
  • Vijay Joshi
  • 438字
  • 2021-07-23 20:33:34

Setting up jQuery UI

We will need the jQuery and jQuery UI libraries before going ahead. Throughout this book, we'll use jQuery Version 1.10.2 and jQuery UI Version 1.10.4 with the UI lightness theme . Note that the jQuery UI files also contain a copy of the jQuery source file.

Downloading the required files

To download jQuery, visit the download page on the jQuery website at http://jquery.com/download/.

Tip

Make sure that you download the correct version as per your requirements.

For jQuery UI, visit the download page at http://jqueryui.com/download/ to download the jQuery UI library.

Tip

Since we will cover all components throughout the book, download the full version of the library.

Using jQuery/jQuery UI libraries with a CDN

You might be aware that Content Delivery Networks (CDN) host many popular libraries. Since the browsers cache JavaScript files, your page will not have to load a JavaScript file again if it is referenced from a CDN and already cached in browser. You can link jQuery and jQuery UI among CDN's many other libraries.

Tip

Make sure that you are connected to the Internet if you have referenced the libraries from the CDN in your pages.

Google, Microsoft, and some other companies provide CDN for jQuery, jQuery UI, and other libraries. Here are the links to pages for downloading these libraries:

Setting up the folder structure for the JavaScript and CSS files

We will now set up the folder structure that we will use for all the chapters in this book. The steps are as follows:

  1. In your document root, create a folder named MasteringjQueryUI. Then, create a folder for each chapter inside it.
  2. For this chapter, create a new folder named Chapter1 inside MasteringjQueryUI and two more folders named js and css inside the Chapter1 folder.
  3. Now extract the jQuery UI files into a separate folder and go to its js folder. You will see three files: jQuery source file and full and minified versions of jQuery UI.
  4. Copy the jQuery source file and any one version of jQuery UI source files and place them inside the js folder that you created inside Chapter1 of the MasteringjQueryUI folder.
  5. Also, copy the ui-lightness folder from the css folder from the downloaded jQuery UI to the css folder of Chapter1.

Now we are ready to experiment with jQuery UI and create some informative and fun examples. Let's start our journey by creating the quiz application.

主站蜘蛛池模板: 洪江市| 太湖县| 额尔古纳市| 新竹市| 特克斯县| 兴隆县| 西乡县| 壶关县| 鄂托克前旗| 嘉善县| 汽车| 武功县| 思茅市| 衡东县| 漳平市| 曲水县| 苍山县| 西盟| 南昌县| 洛川县| 左权县| 县级市| 麻城市| 洪洞县| 咸宁市| 织金县| 深泽县| 铜鼓县| 宁强县| 麻栗坡县| 临夏县| 青浦区| 吉安市| 竹溪县| 东乌| 安平县| 元江| 永春县| 余干县| 达拉特旗| 东丰县|