Take the 2-minute tour ×    the same as:  share|improve this
question add comment  4 Answers  up vote 13 down vote accepted
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.  share|improve this answer add comment  Almost (see
Jeff's answer).  jQuery abstracts away attribute getting, but it
isn't always the most terse option.  It is however shorter than
getAttribute('id').  share|improve this answer add comment  Same
result, but this.id is much faster as it doesn't require all the
jQuery stuff around it. You will also get different results if
that item doesn't have an id.  share|improve this answer add
comment  Exactly the same, it'll get the element's ID...
honestly don't know what more I can say here for a more in-depth
answer.  share|improve this answer Thanks thedixon! I appreciate
you trying to help out. Q: How are you monitoring jQuery
questions? Is it through emai