This in jquery means "current object". This represents the current element in html. Use the "$(this)" statement to turn the html element into a jquery object, and then use the jquery method to process the current Object, the syntax is "$(this).jquery method name();".
The operating environment of this tutorial: windows10 system, jquery3.6.0 version, Dell G3 computer.
What does this mean in jquery
this is the dom object. To put it bluntly, it is the tags in html. $(this) is the dom object. The object is changed to a JQuery object, so that the Dom object can be processed using JQuery methods later.
First, let’s take a look at the $() symbol in JQuery. In fact, this symbol is equivalent to JQuery() in JQuery, that is, $(this)=jquery(); that is, this can return a jquery object. Then, when you alert($('#id')); on the web page, an [object Object] will pop up. This object object is also a jquery object.
The example is as follows:
Output result:
##Related video tutorial recommendation:The above is the detailed content of What does this mean in jquery. For more information, please follow other related articles on the PHP Chinese website!