It's easy to show a modal dialog with javascript in Bootstrap.
But how to make the modal open at page load without the need of a document.ready function or a body onload function?
My need is to load a page and have the modal allready opened. I don't want a delay nor a transition effect when the page load. I want that the modal is opened at startup.
I look the modal.js a little bit and tried adding class="modal-open" on the body with no effect.
<div class="modal in" id="journalModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title" id="myModalLabel">modal title</h4> </div> <div class="modal-body"> body </div> </div><!-- /.modal-content --> </div><!-- /.modal-dialog --> </div><!-- /.modal --> Is it possible? How to do it ?