1
As you can see in my code below, I needed to turn my image into Javascript link instead of using the simple HTML method (for specific reasons), but I need it to take a 3-second interval for the boot function, but I couldn’t... you can tell me what I did wrong?
<a name="subir">aqui</a>
<div style="height: 1000px; width: 100%;"></div>
<img src="next.png" id="cima">
<script type="text/javascript">
document.getElementById('cima').addEventListener('click', function() {
location.href = '#subir'}, 3000);
</script>
You actually only used the wrong function. First see the documentation of addeventlistener and then check if this helps you https://answall.com/q/23861/57801
– Don't Panic
You’re right, wrong syntax! as said @dvd
– Thiago Soubra