Question

Is it possible to load new data between td tags and change the background image of the td tags with jQuery if I gave each one a id?

If so, how would it be done?

Was it helpful?

Solution

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

All of this is documented in detail at the jQuery website: http://docs.jquery.com/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top