The popup does not close because you have an error in the callback function, so it crashes before bootbox can make the popup disappear.
The best guess is that Example
is not defined in your code. Maybe you took it on the Bootbox website, they are using a javascript object called Example
.
If you want to show the result with your callback function, you can add this to your html:
<a href="#" class="btn btn-primary btn-lg alert3">CLICKMEMEMEMEMEME</a><br/>
<p id='result'></p>
And then change your javascript:
<script>
$(document).on("click", ".alert3", function(e) {
bootbox.prompt("What is your name?", function(result) {
if (result === null) {
$('#result').html("Prompt dismissed");
} else {
$('#result').html("Hi <b>"+result+"</b>");
}
});
});
</script>