Jump to content

m0atz

Members
  • Content Count

    2
  • Joined

  • Last visited

Community Reputation

0 Neutral

About m0atz

  • Rank
    Newbie
  1. Hey thanks for the reply. I'm lifting the code straight from bootstraps examples : http://twitter.github.io/bootstrap/javascript.html#modals so shouldnt think its incorrect in terms of syntax. Using the button works cool, just when I try some kind of load...
  2. Hi all, I'm using a simple example template from Bootstrap and wish to display a modal form when the page loads. I have the code below direct from bootstrap to load the modal form when a button is pressed, but i've tried a few other things to get the modal to appear on load, but none of which is working. I'm sure its something simple, but this is a learning curve for me, so any help appreciated. Code I've got from Bootstrap: <!-- Button to trigger modal --><a href="#myModal" role="button" class="btn" data-toggle="modal">Launch demo modal</a> <!-- Modal --><div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h3 id="myModalLabel">Modal header</h3> </div> <div class="modal-body"> <p>One fine body…</p> </div> <div class="modal-footer"> <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button> <button class="btn btn-primary">Save changes</button> </div></div> I've tried using the following to get it to load on the form load: $('#myModal').modal('show') and $(document).ready(function(){ $('#myModal').modal('show')}; neither of which I can seem to get to work. Cheers Col
×
×
  • Create New...