JavaScript frameworks (Libraries) JavaScript advanced programming (especially complex processing of browser differences) are usually difficult and time-consuming. To cope with these changes, many JavaScript (helper) libraries have emerged. These JavaScript libraries are often called Java
JavaScript framework (Library)
JavaScript advanced programming (especially complex processing of browser differences) is usually difficult and time-consuming. To cope with these changes, many JavaScript (helper) libraries have emerged.
These JavaScript libraries are often called JavaScript frameworks.
JQuery
JQuery is currently the most popular JavaScript framework. It uses the CSS selector to access and operate HTML elements (DOM objects) on the webpage ). JQuery also provides companion UI (User Interface) and plug-ins.
JQuery greatly simplifies JavaScript programming and is easy to learn.
JQuery library-Features
JQuery is a JavaScript function library. The jQuery Library has the following features:
- HTML element selection
- HTML element operations
- CSS operations
- HTML event Functions
- JavaScript effects and animation
- Html dom traversal and Modification
- AJAX
- Utilities
How to use it? I have never used it before. I feel very confused... Try to get it done...
1. Download
Go to the official jQuery website http://jquery.com/, and download jQuery 1.11.1 ".
A Brief Introduction:
It is best to use uncompressed files during development or debugging. compressing files can save bandwidth and improve production performance for actual websites.
JQuery 2.x has the same API as jQuery 1.x, but does not support Internet Explorer 6, 7, and 8.
The download is: jquery-1.11.1.js (the jQuery library is located in a JavaScript file that contains all jQuery functions .)
If you do not want to store the jQuery library on your computer, you can load the CDN jQuery core files from Google, Microsoft, and other places.
Ii. Use
For example, now I want to implement a hidden effect. For example, if I click a piece of text, the text will disappear. So how can we use jQuery to implement it?
First, check the jQuery reference manual. Web: http://www.w3school.com.cn/jquery/jquery_reference.asp
Here, there is an "effect" option. In "effect", there is an hide () function. The function description is: hide the selected element.
It seems that using the hide () function can implement the functions I want to implement. Click "hide ()" to see how to use the function.
Then, take a look at how to reference the jquery-1.11.1.js ".
Place the jquery-1.11.1.js in the same-level directory of the code and reference the jquery-1.11.1.js with the following code ":