JQuery development environment to build

Each version is divided into about two kinds: the production version and the development version:

Version Size / KB Description
jquery-1.x.js about 288 Developer Edition, a full uncompressed, and more for learning, development and testing
jquery-2.x.js about 251 Developer Edition, a full uncompressed, and more for learning, development and test
jquery-1.x.min.js about 94 production version, compressed compression tool, the volume is relatively small, and the main products bold projects
jquery-2.x.min.js about 83 production version, compressed compression tool, volume is relatively small, the courage main products and projects
using jQuery page in two steps: first, the introduction of the jQuery library, then use jQuery for interface operation.

Item 1 introduction of the jQuery library
jQuery does not require installation, simply download the jQuery library into a public directory site, and then introduced to the label by <script> in the page.
<Script type = "text / JavaScipt" the src = "JS / jQuery-1.x.js"> </ Script>
. 1
jQuery simple test
after introduction jQuery library in the page, the page elements acquired by $ () function , and positioning elements or effect processing. In the case of no particular description, the symbol $ is the abbreviation jQuery object, such as $ ( "myDiv") and jQuery ( "myDiv") completely equivalent.
<! DOCTYPE HTML>
<head>
<Meta charset = "UTF-. 8">
<title> Test Example </ title>
<Script type = "text / JavaScipt" the src = "JS / jQuery-1.x.js"> </ Script>
</ head>
<body>
<div the above mentioned id = "myDiv"> the Hello World! </ div>
<Script of the type = "text / JavaScript">
$ (the Document).




</ body>
</ HTML>
. 1
2
. 3
. 4
. 5
. 6
. 7
. 8
. 9
10
. 11
12 is
13 is
14
15
16
code above, by reading the jQuery <div> tag content, $ (document) .ready () method role is similar to the JavaScript window.onload event, but there are some differences:

The difference between items window.onload $ (document) .ready ()
to perform the execution time must all be loaded (picture included download) the page after the implementation of all the DOM structure downloaded on the page, this time may be associated DOM element content and not loaded
execution frequency of a page can have only one, if there is a page in the window.onload drink, only the output of the last complete result tomorrow hair simultaneously output a plurality of results page may have a plurality of successive output results can be
simplified wording None can be abbreviated to $ (http://www.my516.com)
--------------------- 

Guess you like

Origin www.cnblogs.com/hyhy904/p/10989704.html