jquery $ is another name for jQuery, and jQuery is a function provided by the jQuery library. The function of this function is to find and select elements in the html document based on the parameters in brackets, such as "$(document)" It means selecting the entire document object.
The operating environment of this tutorial: windows7 system, jquery1.2.6 version, DELL G3 computer.
Recommended: jquery video tutorial
jquery $What does it mean?
$ is another name for jQuery
And jQuery is a function provided by the jQuery library (it seems to be more than just a function, because there is also the use of $.ajax(options)) , equivalent to jQuery.ajax(options))
The function of this function is to search and select elements in the html document based on the parameters in (). One of the functions of the function is to replace GetElementByID, but not only It can be an ID or various selectors
For example:
$(document) selects the entire document object
JQuery can also be used wherever $ is used To replace, for example, $('#msg') is equivalent to JQuery('#msg').
However, when we introduce multiple js libraries and the $ symbol is also defined in another js library, then there will be a conflict when we use the $ symbol.
To prevent naming conflicts, the jQuery library provides another mechanism to give jQuery functions another alias.
Aliases can be redefined for JQuery. As follows:
var $j=JQuery.noConflict(); $j('#msg').hide();//此处$j就代表JQuery
The above is the detailed content of jquery $.what does it mean. For more information, please follow other related articles on the PHP Chinese website!