This is my code:
function time(){
function image1(){
document.getElementById("letOrSellBannerHousePrice").style.backgroundPosition = "-754px 0px";
}
function time1(){
setTimeout("image1()", 5000);
}
function image2(){
document.getElementById("letOrSellBannerHousePrice").style.backgroundPosition = "-1508px 0px";
}
function time2(){
setTimeout("image2()", 11000);
}
function backToOriginal(){
document.getElementById("letOrSellBannerHousePrice").style.backgroundPosition = "0px 0px";
}
function time3(){
setTimeout("backToOriginal()", 17000);
}
function init(){
time1();
time2();
time3();
}
}
function runThis(){
time();
}
window.onload = runThis;
I want the background image to be scrolling but when I run the program the script don’t run. I can’t find my mistake.
this is what i put on my css code background:url("image source");
can this be done.
please help im new here
In
timefunction there are only defenitions of functions, but there is no calling. Try to addAt the bottom of the
timefunction.Also replace
by
and so on.