I am using the following code:
$(".searchBtn").closest('form').sub开发者_运维技巧mit(function () {
$(this).find('.showComments tr:last').after("<tr><td>TEST</td></tr>");
});
and I have a
<form>
<div>
<table class="showComments"><tr><td></td></tr></table>
</div>
<input type="submit" class="searchBtn" value="Submit">
</form>
in my HTML page.
However, this code doesn't work. Any ideas?
Thanks
Joel
Works fine for me. Maybe you just need to throw in a return false
?
http://jsfiddle.net/h7WCv/
精彩评论