jQuery: Add an attribute to each TD to a dynamically generated table
===

As the tittle says.. I want add an attr to each TD to table generated after success ajax function but only accepted one attribue in first TD but in others doesn't work.


    $.each(response, function (index,record){
          var row = $("<tr class='"+record.IdPerfil+"'/>");
          $("<td attrone='"+record.NomPerfil+"'/>").text(record.NomPerfil).appendTo(row);
          $("<td attrtwo='"+record.DesPerfil+"'/>").text(record.DesPerfil).appendTo(row);
          $("<td />").html("<a href='#' class='bModifyProfile'>Modificar</a>").appendTo(row);
          if (record.EdoPerfil == 1) {
              $("<td />").html("<input type='checkbox' checked/>").appendTo(row);
              row.css("backgroundColor","#b0f2b1");
          } else {
              $("<td />").html("<input type='checkbox' />").appendTo(row);
              row.css("backgroundColor","#ffddec");
          }
          row.appendTo("#rBuscarPerfil");
    });

When show the alert with content of **TD -- attrone**
         
    alert($(this).closest('tr').find('td').attr('attrone'));

Works! and display content of this TD, but if change **attrone** to **attrtwo**.. in alert print the message **undefined**  Why?

You ask if I am getting value correctly, but yes, I get it correctly is just simply not allow me to add a custom attribute to each TD-

I hope can help me please!