Created
February 6, 2014 14:16
-
-
Save kakubei/8844995 to your computer and use it in GitHub Desktop.
Substitute regular javascript alert with JQuery one using Coffeescript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.alert = (message) -> | |
$(document.createElement("div")).attr( | |
title: "Alert" | |
class: "alert" | |
).html(message).dialog | |
buttons: | |
OK: -> | |
$(this).dialog "close" | |
return | |
close: -> | |
$(this).remove() | |
return | |
draggable: true | |
modal: true | |
resizable: false | |
width: "auto" | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment