How to delete the parent of an anchor tag using jQuery
- by Vinni
Hello guys,
I have an requirement of deleting the parent element of an anchor tag. I am adding div and anchor inside it dynamically. below is my code, Please help me out
$("<div>"+offer+"<a href='javascript:deleteOrder(this.parent)'>X</a></div>").appendTo($('#resultTable #resultRow td')[selectedOrder-1]);
function deleteOrder(obj)
{
$(obj).parent().remove();
}