This question already has an answer here:
I have a specific sweet alert on my website that I use for my div class that opens with onclick, but I want this onclick alert to stop after 60 seconds for example. So after 60 seconds the alert won't show up if I click the div.THis is what I got so far
<script type="text/javascript">
function JSalert(){
swal("Error", "You have to watch the video first.", "error");
}
</script>
<div class="blocked" onclick="JSalert()">
</div>