I have a tr with attribute as a unique id. How do i add a new tr when a user from ano开发者_StackOverflowther account replies and i can see the reply without refreshing the page?
didnt get ya completely but to append a new tr to a specific tr you can use
$('#trUniqueId').append(
$('<tr/>').attr("id","newtrId")
);
Try this
$(‘ tblDoc tr:last’).after(
"<tr><td style=’width:150px;’>value1</td><td style=’width: 150px’>value2</td><td style=’width: 150px’></td></tr>"
);
Alfred is correct, your question is very vague.
However, to add a new row (newID) after the existing row (uniqueID), use the following code:
$('#uniqueID').after('<tr id="newID">' + CELL CONTENT + '</tr>');
As for pulling in the information via Ajax, we'll need to see code samples.
精彩评论