Jquery usage Summary (1) -- understanding and learning jquery

Source: Internet
Author: User
Document directory
  • 2.1 Add reference
  • 2.2 Add entry functions
  • 2.3 Add code
  • 2.4 preliminary exploration Selector
Preface

I have recently compiled some previous blog posts and found that the series "extjs usage summary" with the highest number of views and comments, this series of seven articles can basically help a person who is new to extjs to learn and start using extjs. Here, to make it easier for everyone to find and re-post the address:

Summary of how extjs is used (1) -- configure and table controls using http://blog.csdn.net/rocket5725/article/details/4535323

Extjs usage Summary (2) -- form and input controls http://blog.csdn.net/rocket5725/article/details/4538843

Summary of extjs usage (3) -- tree structure http://blog.csdn.net/rocket5725/article/details/4551429

Extjs usage Summary (4) -- drag-and-drop and pop-up window http://blog.csdn.net/rocket5725/article/details/4553726

Extjs usage Summary (5) -- layout http://blog.csdn.net/rocket5725/article/details/4554730

Extjs usage Summary (6)-tool bar and menu http://blog.csdn.net/rocket5725/article/details/4555207

Extjs usage Summary (7) -- data storage and transmission http://blog.csdn.net/rocket5725/article/details/4557183

Extjs is the JS library I used in the previous system. Later, in the actual application process, there were some bottlenecks in page speed loading. Although I have been trying to optimize it, but the problem persists. So in a later project, we chose jquery.

In order to make JavaScript more accessible to more people, the series of articles "jquery usage summary" will be released from the beginning of this article. You are welcome to continue to support and provide valuable comments.

What is jquery?
Jquery official website http://jquery.com/the above definition is "jquery
Is a fast and concise JavaScript library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jquery
Is designed to change the way that you write JavaScript. "jquery is a simple and fast JavaScript library that can quickly process many web development processes, such: HTML documents, event processing, animation, Ajax interaction, etc. The most important explanation is: jquery will change the way you write javascirpt. As for how to change it, we will find it in subsequent tutorials.
Why jquery? 1. Being lighter than extjs is not a final conclusion, but a personal feeling. In the preface, I have already explained why I chose jquery. That is, I found that extjs has a certain bottleneck, or it is relatively cumbersome. In terms of speed, jquery is indeed faster than ext
2. the advantages of the JS library itself since I got in touch with extjs, I fully realized the convenience that the JS Library brings to us. A lot of complicated code has become a simple function call in these JS libraries, lazy people will become lazy, which is probably the truth. When you know the benefits of the JS library, you can't lose anything you want. 3. in other aspects, such as powerful functions, rich UI, and browser compatibility issues, this article will not elaborate, and each person has his or her reasons for choosing jquery, however, no solution solves all problems.

How to Use jquery? This article uses "Hello jquery !" For example, the usage of jquery is introduced. 1. download jquery on the official website. jquery has two formats of scripts for download: compressed version (suitable for release, because the file size is very small), non-compressed version (suitable for debugging) as shown in, the latest version on the website is 1.8.3. You can select the minified version release. 2. Configure jquery2.1 to add references and reference them using relative paths.

<HTML> 2.2 Add an entry function. This is somewhat similar to extjs's Ext. onready (function (){});
<HTML> 

$ (Document). Ready () involves jquery syntax. The next article will introduce syntax-related knowledge.

This can also be abbreviated:
       $(function(){                  });
2.3 Add code
<HTML> 

Why write the JS Code we want to execute to $ (document). Ready? One reason is to prevent the document from running jquery code before it is fully loaded. This is the same as extjs.

Change the local code Beibei to the local file name hello.html.
[Note] no iis server is required. This is different from extjs.
2.4 The strength of the selector jquery is also reflected in the powerful selector. As this chapter is only a beginner of jquery, it will not be discussed in depth. Here is just a guide.
<HTML> In this way, a simple jquery code is compiled. You can directly copy it. Once you click a hyperlink, the effect is as follows:

Is it easy? Are you particularly excited? Let's start learning about jquery.

What articles in this series include? Due to the time relationship, this series of articles will roughly include the following parts: 1. Getting started with jquery allows beginners to enter the world of jquery. 2. jquery's selector makes jquery users realize the greatness of jquery's selector. In addition to the selector, it also contains attributes and style processing. 3. Introduction of jquery grid the preliminary use of jquery grid makes users Fall In Love With jquery.4. Introduction of jquery UI recognizes the general UI, only then can you really understand why jquery has changed our habit of writing JavaScript code. 5. Large instance applications prove why we chose jquery.

Author: Xue jingming
Source: http://blog.csdn.net/rocket5725
The copyright of this article is shared by the author and csdn. You are welcome to repost it. However, you must retain this statement without the author's consent and provide the original article connection clearly on the article page. Otherwise, you will be entitled to pursue legal liability.

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.