i would like to remove a row from a table using jQuery. Here is the html:
<tr>
<td><center><a id="remove" href="#"><span class="glyphicon glyphicon-remove"></span></a></center></td>
</tr>
my jquery script:
$('td a').on('click',function(e){
//delete code.
e.preventDefault();
$(this).parent().remove();
});
when i click on the link, nothinh happens. Anybody can help me?
<center>doesn't exist anymore.class="remove"instead ofid="remove"since there should only be one of each id on a page.