jquery: remove a link with same id as the link who triggered the event?
<p>i have 2 links with same id.</p>

<pre><code> &lt;a class='showtag' id=" . $row['id'] . " href=''&gt;" . $row['name'] . "&lt;/a&gt;&lt;a class='removetag' id=" . $row['id'] . " href=''&gt; -&lt;/a&gt;&lt;br /&gt;";
</code></pre>

<p>how do i remove the first one by clicking on the second one.</p>

<p>i just need the selector to use with jquery remove().</p>

<p>EDIT: i have tried this one:</p>

<pre><code>$("a[id='" + event.target.id + "']").remove();
</code></pre>

<p>but the problem is that it also removes all other of my links that got the same id (i have switched them to class now).</p>

<p>so i need a selector that removes the link before the triggering link and that is a sibling to it (or is next to the triggering link).</p>

<p>thanks</p>
