111 | 111111 |
222 | 222222 |
222 | 222222 |
$(document).ready(function(){
$("#tb tr").each(function(){
$(this).bind("click",function(){
var $tr = $("#tb tr:eq("+$(this).index()+")").clone(true);
//tr.appendTo("#tb tr").eq($(this).index());
$tr.insertAfter($("#tb tr:eq("+$(this).index()+")"));
//var evenTrId = $('#tb tr:even').attr("id");
//$('#tb tr:even').attr("id","hidden_"+evenTrId);
});
});
});
function cli(){
alert($('#tb tr:odd').length);
$('#tb tr:odd').each(function(){
alert($(this).attr("id"));
$(this).remove();
});
$("#tb tr").each(function(){
var $tr = $("#tb tr:eq("+$(this).index()+")").clone(true);
$tr.insertAfter($("#tb tr:eq("+$(this).index()+")"));
});
var evenTrId = $('#tb tr:odd').attr("id")
evenTrId = evenTrId.replace("show","hidden");
$('#tb tr:odd').attr("id",evenTrId);
$('#tb tr:odd').hide();
}