Help,
I found the "onclick change div background"-code by pjo and some modifications by jgadbois. I have tried the example but it doesn't work for me. Please help me make this code work. Here is the css and js.
<style type="text/css">
#hdr {
background : url(header_1.png) no-repeat;
height : 180px;
width : 850px;
}
.hdr1 {
background : url(header_2.png) no-repeat;
height : 180px;
width : 850px;
}
.hdr2 {
background : url(header_3.png) no-repeat;
height : 180px;
width : 850px;
}
.hdr3 {
background : url(header_1.png) no-repeat;
height : 180px;
width : 850px;
}
</style>
<HTML>
<div id="hdr">Sometext</div>
<div><b>Alternate Background Images</b>
<br />
<a href="#none" onclick="document.getElementById('hdr').className='hdr1'">Option 1</a>
<a href="#none" onclick="document.getElementById('hdr').className='hdr2'">Option 2</a>
<a href="#none" onclick="document.getElementById('hdr').className='hdr3'">Option 3</a>
</div>
Any help is appreciated. Thans in advance!!