sweetalert when click ok close alert code example Example: sweetalert close on custom button click swal.close()