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.