Skip to content

Instantly share code, notes, and snippets.

@makeusabrew
Created September 23, 2012 16:12
Show Gist options
  • Save makeusabrew/3772170 to your computer and use it in GitHub Desktop.
Save makeusabrew/3772170 to your computer and use it in GitHub Desktop.
Bootbox usage
<!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