Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

302
Vistas
jQuery create table produce only one cube(box) instead of full table

I'm trying to create a simple table with jQuery.
Currently I got on the browser one single black cube,
while the goal is to have table with 5 rows and 5 cols cubes colored black.

Html:

<table class="t"> </table>

CSS:

.box {
    width:50px;
    height:50px;
    background-color:black
 }

JS

let $table = $('.t')
let $td = $('<td>').addClass('box')

for (let i = 0; i < 5; i++)
 {

    let $tr = $('<tr>')
    for (let k = 0; k < 5; k++) {
        $tr.append($td)
        $table.append($tr)

    }
    $tr.appendTo($table);
}
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda