Side navigation
#3114 closed bug (invalid)
Opened July 01, 2008 11:15PM UTC
Closed January 14, 2009 04:05AM UTC
Last modified March 14, 2012 05:14PM UTC
prependTo and after append
Reported by: | Roberto | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.3 |
Component: | core | Version: | 1.2.6 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
$.getJSON("avaliacoes/avaliacaodesempenho/modelo/ficha_avaliativa.asp",function(data){
$.each(data.itensavaliativos,function(i,item){
tBody = $("<tbody></tbody>").appendTo($("<table></table>").attr({id:"tabelaitensavaliativos",width:"720px"}).prependTo($("#divfichaavaliativa")));
if(item.classificacao=="FATOR"){
//alert(1);
$(tBody)
.append($("<tr></tr>")
.append($("<th></th>").text("Avaliação de "+item.nome_item+":").attr({align:"left",colSpan:"3"}).css("paddingLeft","0.2cm"))
.append($("<th></th>").text("Pontuação").attr("align","center"))
.append($("<th></th>").text("Peso").attr("align","center"))
.append($("<th></th>").text("SubTotal").attr("align","center"))
);
}else
$(tBody)
.append($("<tr></tr>")
.append($("<td></td>").text(item.nome_item).attr({align:"left",colSpan:"3"}).css("paddingLeft","0.2cm"))
.append($("<td></td>").text("").attr("align","center"))
.append($("<td></td>").text(item.peso).attr("align","center"))
.append($("<td></td>").text(0).attr("align","center"))
);
});
});
Hi,
I have the just previous code above, where was created the "tBody" variable. Inside his, was created a table that was "prependTo" to a div object. On the following lines, I create lines and columns to table. The problem is just here, the lines was created in reverse order, althougt i use the "append" command.
Thanks
Can yo please make this an html file with all the require html/js required to reproduce the error ?
Thanks