Carregar dados em uma tabela HTML sem recarregar a tabela inteira
-
06-07-2019 - |
Pergunta
É possível carregar novos dados entre as tags td e mudar a imagem das tags td fundo com jQuery se eu dei a cada um uma id?
Se sim, como seria feito?
Solução
// 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+')');
Tudo isso está documentado em detalhes no site do jQuery: http://docs.jquery.com/
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow