jQuery: Pass anchor element to function when clicked
<p>So.. This one should be simple.  I have an anchor element.  When it is clicked, I want to call a function that will delete it's parent element.  Essentially, it is a link to remove the parent.</p>

<p>How would I accomplish this?  I have tried using the following, which is not working:</p>

<pre><code>&lt;div&gt;
     &lt;a href='javascript:removeParent()'&gt;Remove&lt;/a&gt;
&lt;/div&gt;
&lt;script&gt;
function removeParent() {
     $( this ).parent().remove()
}
&lt;/script&gt;
</code></pre>

<p>Can anyone help me out?</p>

<p>I'm trying to accomplish this because it is a form that can have multiple attributes... So you can add more attributes and thus need a way to remove them.</p>

<p>Cheers!</p>
