i have 2 links with same id.
<a class='showtag' id=" . $row['id'] . " href=''>" . $row['name'] . "</a><a class='removetag' id=" . $row['id'] . " href=''> -</a><br />";
how do i remove the first one by clicking on the second one.
i just need the selector to use with jquery remove().
EDIT: i have tried this one:
$("a[id='" + event.target.id + "']").remove();
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).
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).
thanks