当前位置: 动力学知识库 > 问答 > 编程问答 >

jquery - Add table row with animation

问题描述:

I'm trying to add a table row on-the-fly, I want to make it animated. The problem is this code do not animate table height, it gets longer instantly, but I want to make it smoothly, like fadeIn().

$(document).ready(function () {

$("#mfrmAdd").on("click", function () {

var _tr;

_tr = "<tr id='foo1'>" +

"<td>col1</td>" +

"<td>col2</td>" +

"</tr>";

$(_tr).hide().insertAfter("#startPoint").fadeIn('slow');

});

});

You can view the code here: http://jsfiddle.net/utXC2/

分享给朋友:
您可能感兴趣的文章:
随机阅读: