JavaScript – Overwrite alert()
Here I’m using pnotify to replace default alert
The Code
window.alert = function(title,message) { $.pnotify({ title: title, text: message }); }; alert('Say something','Wohoooooooooooo!'); // this should display alert in pnotify form.