JQuery self-study notes (1): jQuery first, jquery first

Source: Internet
Author: User

JQuery self-study notes (1): jQuery first, jquery first
JQuery is a JavaScript function library. The jQuery library is located in a JavaScript file and contains all jQuery functions. When referencing jQuery, note that the <script> label should be located in the Google CDN:<Script src = "http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"> </script>Microsoft CDN:<Script src = "http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.0.js"> </script>JQuery Syntax:The jQuery syntax is compiled for the selection of HTML elements. You can perform some operations on the elements. The basic syntax is: $ (selector). action ()Ready functions:To prevent the document from running jQuery code before it is fully loaded (ready), you need to use a document ready function: $ (document). ready (function (){

--- JQuery functions go here ----

});Resolve conflicts between multiple databases:JQuery was introduced before other libraries, so the ownership of "$" does not belong to jQuery, then jQuery can be called directly with the jQuery object, or create a "$" character for jQuery (val $ = jQuery). If jQuery is referenced after other libraries, "$" is owned by the jQuery library, other libraries will be ineffective. jQuery provides the following method: jQuery. noConflict (); // removes the $ ownership.

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.