简体   繁体   中英

Auto Launch bootstrap 2.3.2 modal window?

Hello I was wondering if there was some javascript to auto launch the modal window within bootstrap 2.3.2. I am using the modal window for a form and the code for the from is on page and I want the modal window to open back up on the event of an error in the form. My code works fine and it shows the error message in the modal window bu you have to relaunch the window to see it so users may not necessarily know they have errors, so that's my dilemma.

Is there a way to do this? The page isn't refreshing so I can't say load it when the page loads, as I have seen that before.

To launch your modal you can use the following call in javascript/jQuery

$('#myModal').modal();

http://getbootstrap.com/2.3.2/javascript.html#modals

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM