Home  >  Article  >  Web Front-end  >  A brief analysis of the functions and advantages of jquery_jquery

A brief analysis of the functions and advantages of jquery_jquery

WBOY
WBOYOriginal
2016-05-16 17:11:271175browse

Function:

1. Manipulate page objects
2. Modify page appearance
3. Event mechanism of oil painting javascript
4. Add animation effects to the page
5. Optimize ajax


Advantages:

1. Lightweight
2. Excellent browser compatibility
3. Excellent dom operation
4. Chain operation mode
5. Implicit iteration of collections (can select objects The collection is automatically iterated without using a for in loop) such as $("div:lt(2)").css("border-color","red")/*Add css to the first two divs*/
6. Separation of behavior layer and structure (if you want to add an event to dom, you need to declare the function once in javascript and use it once in dom. With jquery, you only need to declare an event of a certain element in the jquery part. Now: $("#myButton").click(function(){code part}))
7. Support extensions
8. Complete learning resources
9. Open source

If you have just started learning, be sure to remember 3456 points, which will be of great help in solving problems in the future.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn