The students who often use jquery are certainly not unfamiliar with the $ (this), because they are often used.
This thing is really good, for example, there are a lot of elements when we select which element, we give him some action,
We can use the $ (this) as well as the need to get the index value of the current element in the parent container.
Well, it's really a good thing, but if you ask me, the principle of this thing, I really do not know, so I checked the information, decided to thoroughly understand him.
$ (this) is divided into two parts, $ () and this one to analyze:
$ () Needless to say it is jquery is a method that returns what that is? We can print it in the console.
An object is a jquery object that is returned, which means that we use $ () to invoke the methods and properties of jquery.
And then, in terms of what this,this is, let's print it.
He is an HTML object that represents the object in which the context is located, that is, he is relative, and the things that are used in different places are not the same. Well, if we put it in $ (), try it.
Not surprisingly, this must also refer to the currently selected jquery object.
What is the difference between this and $ (this)?
This indicates that the current context object is an HTML object that can call the properties of an HTML object, method.
$ (this), which represents the context object is a jquery object that can invoke the methods and property values of jquery.
Please correct me if there are errors or omissions.
$ (this) what exactly is a