Here’s a comparison of a standard error message. The first one uses the built-in alert-function, while the second is using sweetAlert.
Pretty cool huh? SweetAlert automatically centers itself on the page and looks great no matter if you're using a desktop computer, mobile or tablet. It's even highly customizeable, as you can see below!
In these examples, we're using the shorthand function swal to call sweetAlert.
... read the whole story at t4t5.github.io.
swal("Here's a message!")
A title with a text under
swal("Here's a message!", "It's pretty, isn't it?"