Cargue datos en la tabla html sin volver a cargar la tabla completa
-
06-07-2019 - |
Pregunta
¿Es posible cargar nuevos datos entre las etiquetas td y cambiar la imagen de fondo de las etiquetas td con jQuery si les doy una identificación a cada una?
Si es así, ¿cómo se haría?
Solución
// set the background of all td tags
$('td').css('backgroundImage', 'url('+url+')');
// set the content of a particular tag
$('td#someID').html(yourHtml);
// set the background and content of a specific tag
$('td#someID').html(yourHtml).css('backgroundImage', 'url('+url+')');
Todo esto se documenta en detalle en el sitio web de jQuery: http://docs.jquery.com/
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow