Reputation: 3555
I have the next piece of code trying to setup these properties for my bootstrap modal but when I place it into the $(document).ready
the modal shows up when the page loads
$(document).ready(function(){
$('#myModalBug').modal({
backdrop: 'static',
keyboard: false
});
});
How can I make to set these properties without the dialog show up on load page?
Upvotes: 1
Views: 200
Reputation: 1459
$(document).ready(function(){
$('#myModalBug').modal({
backdrop: 'static',
keyboard: false,
show:false
});
});
You can also use data attributes like data-backdrop="static"
.
This way you don't need to write any of your script for modal unless you need explicitly for callbacks.
Upvotes: 1