I am new to ASP.Net MVC. I am following some tutorials and am trying to create a simple bootstrap based application. I found Bootbox and I'd really like to use it, but can't seem to make it work.
I used Package Manager Console to get it:
install-package bootbox
Then I added the js file to my bundleconfig.cs in the bootstrap section:
bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
"~/Scripts/bootstrap.js",
"~/Scripts/bootbox.js",
"~/Scripts/respond.js"));
I am trying to use it as a test for now in an index view that lists customers. I've added this:
@section scripts
{
<script>
$(document).on("click", "#customers .js-delete", function (e) {
bootbox.alert({
message: "This customer will be deleted!",
});
});
</script>
}
When I click the "js-delete" referenced button the page freezes. If I use the native javascript alert/confirm instead everything works fine, so I guess this might have something to do with the way bootbox is referenced, but don't know what to do next to fix this issue. Help?