i want to handle the trigger.click event
this action works once , but how can i handle and edit it
for example click 10 times or click after delay and ....
how should it be customize ?
my code :
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
function dio() {
$("#bin").append("hi" + "<br>")
}
</script>
<button id="btn" onclick="dio()">|||</button>
<div id="bin">
</div>
<script>
$("#btn").trigger('click');
</script>
this action print a hi after loading the page , how can i set click count , and time and stop ?