this id jquery code example
Example 1: get id by this jquery
alert($(this).attr('id'))
Example 2: jquery id
$("#intro")
Example 3: what $this.attr('id')
No, they're not exactly the same.
They'll both return the element's ID, but if the element has no ID, then this.id will return a blank string while $(this).attr("id") will return undefined.