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