t4t5/sweetalert — pull request #226 by mwakerman (2014-12-10 09:04:05+00:00)
Title: Added swal.cancelAlert() method that can be called globally to close the...

... current modal with close animation.

Relevant Issue: #200

This allows SweetAlerts to be used as a kind of busy "spinner" for AJAX request.

```
swal({
title: "Searching...",
text: "Click to cancel your search.",
type: "info",
showCancelButton: false,
confirmButtonColor: "#DD6B55",
confirmButtonText: "Cancel search",
closeOnConfirm: true
});

$.ajax({
url: "test.html",
context: document.body
}).done(function() {
// do something here
swal.cancelAlert()
});
```