Eh ovako “WebMajstori” kako tu da ubacim cookie da mi pamti pozadine…? :gubise:
<script language="javascript" type="text/javascript">
function changeDivImage1()
{
var imgPath = new String();
imgPath = document.getElementById("changebg").style.backgroundImage;
if(imgPath == "url(slike/1.jpg)" || imgPath == "")
{
document.getElementById("changebg").style.backgroundImage = "url(slike/1.jpg)";
}
else
{
document.getElementById("changebg").style.backgroundImage = "url(slike/1.jpg)";
}
}
function changeDivImage2()
{
var imgPath = new String();
imgPath = document.getElementById("changebg").style.backgroundImage;
if(imgPath == "url(slike/2.jpg)" || imgPath == "")
{
document.getElementById("changebg").style.backgroundImage = "url(slike/2.jpg)";
}
else
{
document.getElementById("changebg").style.backgroundImage = "url(slike/2.jpg)";
}
}
</script>
<a href="javascript:;" onclick="changeDivImage2()"><img class="bck" src="slike/thumbs/2.jpg"></a>
<a href="javascript:;" onclick="changeDivImage1()"><img class="bck" src="slike/thumbs/1.jpg"></a>
<div id="changebg">ovdje se mijenja pozadina</div>