Before discussing, let’s agree on the style of defining variables.
If the obtained object is a jQuery object, add $ before the variable, for example:
If the DOM object is obtained, it is defined as follows:
2. Obtain the corresponding DOM object through the get(index) method.
For a DOM object, you only need to wrap the DOM object with $() to get a jQuery object. The method is $(DOM object).
Summary:
1. The get method in jQuery actually obtains Dom elements ($(this).get(0) and $(this)[0])
2. The eq, first, last and other methods in the jQuery method are all returned Jquery objects
3. Only DOM objects can use methods in DOM. jQuery objects cannot use methods in DOM. jQuery objects provide a more complete set of tools for manipulating the DOM.