Is
$(this).attr(\'id\')
the same as:
this.id
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.