jQuery ~ move Table tr

$(document).ready(function(){
$(".up,.down").click(function(){
var row = $(this).parents("tr:first");
if ($(this).is(".up")) {
row.insertBefore(row.prev());
} else {
row.insertAfter(row.next());
}
});
});


reference
http://stackoverflow.com/questions/1569889/jquery-move-table-row

沒有留言: