// 点击
$('#insertRow').click(function(){
var $tr = $('#templateTr').clone(true);
$tr.attr('id','');
$('#columnid tbody').append($tr);
$tr.show();
});
// 删除
$('#columnid .delrow').click(function(){
var $tr = $(this).parents("tr");
$tr.remove();
});
// 升序
function ascProductShow() {
alert("升序");
$(this).each(function(){
var $tr = $(this).parents("tr");
if($tr.index() != 0){
$tr.prev().before($tr);
}
});
}
// 降序
function descProductShow() {
alert("降序");
var trLength = $(this).length;
$(this).each(function(){
var $tr = $(this).parents("tr");
if (($tr.index() != trLength - 1 ) || $tr.index() == 0) {
$tr.next().after($tr);
}
});
}