#3114 closed bug (invalid)
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
Change History (2)
comment:1 Changed 15 years ago by
need: | Review → Test Case |
---|
comment:2 Changed 14 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Please reopen with a clear test case.
Can yo please make this an html file with all the require html/js required to reproduce the error ? Thanks