Home » Boots » Bootstrap Bs Modal Show

Bootstrap Bs Modal Show

i’m using the modal example from the bootstrap 3 docs.

the modal works.

however i need to access the show.


modal event when it fires.

for now i’m just trying: $(‘#myModal’).



modal’,, For a tutorial about Modals, read our Bootstrap Modal Tutorial.

The Modal Plugin Classes.

Class Description.

modal: Creates a modal.

modal-content: Styles the modal properly with border, background-color, etc.

Use this class to add the modal’s header, body, and footer.

modal-header:, 04/12/2017 Bootstrap is using the following timeout to complete showing: c.


BACKDROP_TRANSITION_DURATION=150, So using more than 300 must work and for me 200 is working: $(‘#myModal’).



modal’, function (e) { setTimeout(function(){ //Do something if necessary }, 300); }).

, Here Mudassar Ahmed Khan has explained with an example, how to open (show) Bootstrap Modal Popup Window on Page Load in ASP.

Net using C# and VB.


Inside the Server Side Page Load event handler, the RegisterStartupScript method of ClientScript class is used to register a call to the JavaScript function which will open (show) Bootstrap Modal Popup Window on Client Side using jQuery.

TAGs: #, The version of each of Bootstrap ‘s jQuery plugins can be accessed via the VERSION property of the plugin’s constructor.

For example, for the tooltip plugin: $.




VERSION // => “3.


1” No special fallbacks when JavaScript is disabled.

Bootstrap ‘s plugins don’t fall back particularly gracefully when JavaScript is disabled.

, Bootstrap show.


modal show # relatedTarget #, Option #3.

As Andrew pointed out in the comments below this answer, you can also check to see which element on the page has focus by accessing document.


In the snippet below, an event listener is attached to the modal element for the show and hide events.

When the event is triggered, a check is made to see if the currently focused on element has a [data-toggle] or [data-dismiss.

, I’ve seen a couple of questions in regards to bootstrap modals, but none exactly like this, so I’ll go ahead.

I have a modal that I call onclick like so.



click(function(event){ $(“#modal-content”).

modal(‘show’); }); This works fine, but when I show the modal I want to #, Bootstrap show.


modal show # relatedTarget bootstrap bs modal show