I currently have a code that lets me "check" table cells, but the ones I create dynamically, don't apply to this.
$("td").click(function(){
$(this).toggleClass("active");
});
This code works great for static elements, but when I create one element...:
$("#boton").click(function(){
var object = {
name : $("#nombre").val(),
dni : $("#dni").val(),
telefono : $("#telefono").val()
};
if(count<5){
count++;
$("#tabla").append("<tr><td>"+object.name+"</td><td>"+object.dni+"</td><td>"+object.telefono+"</td>");
}else{
$("#boton").hide();
alert("You added too much elements!");
}
... that element is not selectable. The event doesn't fire for it. How can I change this?