Is it possible to set background image URL in CSS AND give it an ID. I need to give it an ID so I can change the src of the image later on in some javascript?
THanks.
J
#mainNav { background-image: url(mainnavbg.jpg); background-color: #66f; }
[code=html]<table><tr><td class="image" id="yourId"></td></tr></table>[/code]
document.getElementById('yourId').style.backgroundImage = 'url("newBGPic.jpg")';
Help @john_noble spread the word by sharing this article on Twitter...