Created
September 23, 2012 16:12
-
-
Save makeusabrew/3772170 to your computer and use it in GitHub Desktop.
Bootbox usage
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>My page</title> | |
<!-- CSS dependencies --> | |
<link rel="stylesheet" type="text/css" href="bootstrap.min.css"> | |
</head> | |
<body> | |
<p>Content here. <a class="alert" href=#>Alert!</a></p> | |
<!-- JS dependencies --> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | |
<script src="bootstrap.min.js"></script> | |
<!-- bootbox code --> | |
<script type="text/javascript" src="https://raw.github.com/makeusabrew/bootbox/v2.4.2/bootbox.min.js"></script> | |
<script> | |
$(".alert").click(function(e) { | |
bootbox.alert("Hello world!", function() { | |
console.log("Alert Callback"); | |
}); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment