JQuery $(this).attr("name") vs this.name

attr, javascript, jquery, this

Solution

The first gets the attribute value from the jQuery object formed from the DOM element. The second gets the property directly from the DOM element, and is therefore quicker. You should use native properties where possible.

Problem

What is the main different between ``` $(this).attr("name") ``` and ``` this.name ``` and What is the technical explanation?

Original source