I wanna onclick which my quiz correct question .change background color and 1 or 2 second after myDiv display none this correct...but i wanna first mydiv change background color then read this function...
function duzgun() {
if (ikiSual.style.display = "none") {
ikiSual.style.display = "block"
ucSual.style.display = "none"
dordSual.style.display = "none"
besSual.style.display = "none"
birSual.style.display = "none"
}
} else {
alert("sehv cavabdi")
}
}
I think you want it:
function setbackground() {
document.getElementById("element").style.backgroundColor = "yellow";
setTimeout(duzgun, 3000);//3000 = 3 seconds, 2000 = 2 seconds
}
function duzgun() {
if (ikiSual.style.display = "none") {
ikiSual.style.display = "block"
ucSual.style.display = "none"
dordSual.style.display = "none"
besSual.style.display = "none"
birSual.style.display = "none"
} else {
alert("sehv cavabdi")
}
}