In bootstrap css, it is possible to display a modal dialog, but I want to be able to make it modal so the UI behind doesn't respond, without having the dark black background shown.
There seems to be no options that allow me to do this on the $("#selector").modal() function.
On Options chapter, in the page you linked, you can see the backdrop option. Passing this option with value 'static' will prevent closing the modal. As @PedroVagner pointed on comments, you also can pass {keyboard: false} to prevent closing the modal by pressing Esc .
Data-keyword="false" is to prevent closing modal while clicking Esc button, while data-backdrop="static" , allows you keep modal pop-up opened when clicking on Gray area.
The backdrop option specifies whether the modal should have a dark overlay (the background color of the current page) or not.
Bootstrap modals are supposed to be responsive by default. Something to look out for is if you have a width set on your Modal.
add data-backdrop="false"
to <div class="modal">
and Bootstrap will do the rest.
Example:
<div class="modal" id="genericModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="false">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With