Skip to main content

ghosta.close

To close alert by id or all alerts

Options

PropertyTypeDefaultDescription
idnumber-Close alert that has a given id. If you don't pass any id all alerts will close

Usage

If you don't pass any id, all alerts will close
ghosta.close();

Close alert that has a given id
const id = ghosta.fire({ title: "Alert title" });
ghosta.close(id);