My goal was to create function which will exchange 4 divs in the same place after delay which means...
div "commission1" is visible so after 1 second it dissapears and div "commission2" takes its place> dissapears after 1 second> comission3>dissapears>comission4 and it should be looped, but before i managed to do that it is already not working.
i have unexpected end of input error I didn't find any lack of sign or letter so i don't know what is going on with this error
Keep in mind that it's first time after 4 years of break that im using java and back then i was already beginner :D.
Thank you in advance :)
function visibility()
{
if (document.getElementById("commission1") != null) {
document.getElementById('commission1').style.display = 'display';
setTimeout("document.getElementById('commission1').style.display = 'none'", 1000);
setTimeout("document.getElementById('commission2').style.display = 'display'", 1000);
setTimeout("document.getElementById('commission2').style.display = 'none'", 2000);
setTimeout("document.getElementById('commission3').style.display = 'display'", 2000);
setTimeout("document.getElementById('commission3').style.display = 'none'", 3000);
setTimeout("document.getElementById('commission4').style.display = 'display'", 3000);
setTimeout("document.getElementById('commission4').style.display = 'none'", 4000);
setTimeout("document.getElementById('commission1').style.display = 'display'", 4000);
}
{,}and see that the numbers don't match.