I am trying to dynamically add rows to a specific table on my site which has many tables. I use the following jquery to perform that task. However, in the appendto method if I put in the passed variable of addrow it adds the row to all of my tables but if I specify with text the id it works fine.
function addrow(id){
$("<tr><td><input type = 'text' value = 'Equipo 1' /></td><td></td><td></td><td></td><td></td></tr>").appendTo("[id] tbody");
}
id is "#5a7"
this way a row gets added to all of my tables
function addrow(id){
$("<tr><td><input type = 'text' value = 'Equipo 1' /></td><td></td><td></td><td></td><td></td></tr>").appendTo("#5a7 tbody");
}
If I do it like this it works fine and only adds the row to that table.
Any ideas?