Domanda

È possibile caricare nuovi dati tra i tag td e cambiare l'immagine di sfondo dei tag td con jQuery se ho dato a ciascuno un ID?

In tal caso, come si farebbe?

È stato utile?

Soluzione

// 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+')');

Tutto questo è documentato in dettaglio sul sito Web jQuery: http://docs.jquery.com/

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top