sweet alert version 1 close alert on click event code example Example: sweetalert close on custom button click swal.close()