0
I would like to know how to click on a button to fire another click after 1 second.
I found this solution here. But I would like to add this delay of 1 second.
Code:
$("#button1").click(function(){
$("#button2").trigger('click');
});
$("#button2").click(function(){
$("#box").append('<p>Botao 2 clicado</p>');
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<div id="box">
<button id="button1">Botao 1</button>
<button id="button2">Botao 2</button>
</div>