I am using JQuery. I call a javascript function with next html:
<li><span><a href="javascript:uncheckEl('tagVO-$id')">$tagname</a></span></li>
I would like to remove the li element and i thought this would be easy with the $(this) object. This is my javascript function:
function uncheckEl(id) {
$("#"+id+"").attr("checked","");
$("#"+id+"").parent("li").css("color","black");
$(this).parent("li").remove(); // This is not working
retrieveItems();
}
But $(this) is undefined. Any ideas?