Ten quickly improved JQuery performance to make JQuery run faster _ jquery-js tutorial

Source: Internet
Author: User
JQuery is becoming the preferred JavaScript library for Web developers. As a Web developer, in addition to understanding the application skills of languages and frameworks, how can we improve the language performance, this article provides ten simple steps to instantly improve the performance of your script. For more information about how to quickly run JQuery, see the following ten steps to instantly improve the performance of your script.. Don't worry. This is not an advanced technique. Everyone can use it! These skills include:
Use the latest version
Merge and minimize scripts
Replacing each with
Replace class selector with ID
Specify the front and back text for the selector
Create Cache
Avoid DOM operations
Avoid using concat () and use join () to process long strings
Returns false.
Using cheat sheet and reference documents
Use the latest version
JQuery has been in constant development and improvement processes. John and his team are constantly researching new ways to improve program performance.
A few months ago, he also released Sizzle, a JS selector library that is said to be able to improve program performance by three times in Firefox.
If you don't want to keep an eye on whether a new version is available and then spend time downloading and uploading it, Google will help you again. Their servers store a large number of Ajax libraries for you to choose from.

The Code is as follows:



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.