bootstrap modal disappear immediately after showing
In my case the problem of showing and immediately disappearing modal window was that I called toggle twice. First, in tag in HTML file, and then when attaching event handler in JavaScript file, like so:
<a role="menuitem" tabindex="-1" href="#" data-toggle="modal" data-target="#myModal" id="deleteItemButton">Delete Item</a>
$ultodoListDisplay.on( "click", "#deleteItemButton", function(){
$('#myModal').modal('toggle');
});
References to the Bootstrap CDN and stylesheets were correct. Therefore, define toggle of modal window only once.
I had this problem and the solution was simple... I was loading both bootstrap.js AND bootstrap-modal.js.
bootstrap.js includes bootstrap-modal.js.
Solution: Remove bootstrap-modal.js from your head
and it'll work correctly.