I have been successful in adding rows and cells to a table when the content of each cell is a text input. But when I try to add custom text (or a hyperlink) I do not get any result. Here is my code:
if (bb == "link") {
var newRow = $("<tr></tr>").appendTo(thisTable);
var newLinkCell = $("<td></td>").appendTo(newRow);
var hInput = $("<span>" + l + "</span>").appendTo(newLinkCell);
}
UPDATED FIDDLE:
This is the relevant code. A fiddle of the entire problem is here: http://jsfiddle.net/N8sW2/1/
My problem deals with the “Link to Page” button. Please help.
This line will find no elements because your add button has no siblings which are tables.