Bug Tracker

Modify

Ticket #3114 (closed bug: invalid)

Opened 5 years ago

Last modified 14 months ago

prependTo and after append

Reported by: Roberto Owned by:
Priority: major Milestone: 1.3
Component: core Version: 1.2.6
Keywords: Cc:
Blocking: Blocked by:

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

comment:1 Changed 5 years ago by flesler

  • need changed from Review to Test Case

Can yo please make this an html file with all the require html/js required to reproduce the error ? Thanks

comment:2 Changed 4 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to invalid

Please reopen with a clear test case.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.