im trying to change an html page with a delay of 3 sec when the user clicks on a specific div in the screen.
document.getElementById("specificDiv").addEventListener("click", setTimeout(document.getElementById("linkToAnotherPage").click(), 3000) )
however the eventListener doesnt work. when the page loads up it automatically clicks on the “linkToAnotherPage” after 3 sec have past since loading the page.
would love if someone could help me understand whats wrong here.