I've got two divs like:
<div id="h1" style="display: none;"></div>
<div id="h2" style="display: none;"></div>
and
<a onclick="showh1()">h1</a>
<a onclick="showh2()">h2</a>
and this javascript for choose one div to be shown
function showh1() {
document.getElementById('h1').style.display = "block";
}
function showh2() {
document.getElementById('h2').style.display = "block";
}
But I'd like to show div h1 after x seconds or when the users clicks to show one of two divs. How can I do this? Thank you!