May 31, 2021 Article blog
jQuery literally means JavaScript and Query, a library used to aid the development of JavaScript. j
Query is another high-quality Javascript library after prototype, which is an open source programming language.
jQuery itself is a plug-in-based JavaScript library whose various features can be enhanced with new plug-ins. jQuery provides an abstract layer of Web programming that makes it compatible with any browser and greatly simplifies what was previously done with JavaScript, which in short, jQuery can do as follows.
1, quickly get document elements: jQuery's selection mechanism is built on Css selectors, which provides the ability to quickly query elements in DOM documents, and greatly enhances the way JavaScript gets page elements.
2, provide beautiful page dynamic effects: JQuery built-in a series of animation effects, can develop very beautiful pages, many well-known sites are currently using jQuery's built-in effects, such as fade in and out, element removal and other dynamic effects.
3, create Ajax no refresh page: Ajax is asynchronous JavaScript and XML short, can develop a very sensitive and refresh-free web pages, especially when developing server-side web pages, such as PHP web site, need to communicate with the server, if you do not use Ajax, each data update had to refresh the page, and after using Ajax effects, you can partially refresh the page, providing a very dynamic effect.
4. Provide enhancements to the JavaScript language: JQuery provides enhancements to the basic JavaScript structure, such as element selection and array processing.
5, enhanced event handling: jQuery provides a variety of page events, it can avoid programmers in HTML to add too much event processing code, and most importantly, its event processor eliminates a variety of browser compatibility issues.
6, change the content of the page: JQuery can modify the content of the page, such as changing the text of the page, insert or turn the page image, jQuery simplifies the original use of JavaScript code needs to deal with the way.
JQuery is so good because it integrates a lot of good features, mainly the following:
1. Use css selectors to provide high-speed element-finding behavior.
2. Provides an abstraction layer to standardize a variety of common tasks, can solve various browser compatibility problems.
3. Simplify the complex code, provide embellishment programming mode, greatly simplify the operation of the code
jQuery has grown to date, updated more than a dozen new versions, w3cschool for you to organize the "each version of JQuery .js collection" for your reference, download and use.
jQuery has become a very popular JavaScript framework and has great scalability, and jQuery can make your job easier.
The JavaScript code that does not use jQuery to set up UI text is as follows:
The JavaScript code after using the jQuery class library is as follows:
It can be seen that after using the jQuery class library JavaScript code is obviously much simpler, but also more in line with the characteristics of the IT industry: short, flat, fast.
Before you begin jQuery, you should have a basic understanding of:
If you want to learn jQuery faster and more systematically, you'd better follow the learning model of jQuery micro-classes.
If you find jQuery's learning difficult and difficult to understand, we recommend that you use a video tutorial: jQuery video course
After learning this tutorial, do real-world exercises to be effective Oh: jQuery real-world combat