I this you want $(this).remove();

-----Original Message-----
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Krommenaas
Sent: Monday, October 19, 2009 10:11 AM
To: jQuery (English)
Subject: [jQuery] this.remove


I was wondering why in a link's click event...
  $('a.').click( function() {

this won't work...
   this.remove()

but this does work...
  $('#'+this.id).remove();

as will this...
    $('a[name='+this.name+']').remove();

It's not a problem since I have these work-arounds, I'm just trying to
understand why this.remove() doesn't work. Tia.

Reply via email to