why dont work remove()
why dont work remove()
Hi,
how remove element make of append?
The selector $('#link') not remove to the element.
Someone help me?
$(document).ready(function() {
$('#add').click(addElemento);
function addElemento() {
var id = document.getElementById("id").value;
var numero = $('#numero').val();
var serie = $('#serie').val();
$("#divTxt").append("<p id='"+id+"'>"+id+"<a href='#' id='link' rel='"+id+"'>Valor</a></p>");
id++;
document.getElementById("id").value = id;
}
$('#link').livequery('click', function(){
var n = $(this).attr('rel');
$(n).remove();
return false;
});
});