Using Modal Form Box

Using Modal Form Box

Hello. I may end up having several posts about this topic in all. I'm trying to use Twitter Bootstrap Modal for a popup form on my page.

The main page says that I can control when the popup opens, closes..etc by using this base function.
http://w3resource.com/twitter-bootstrap/modals-tutorial.php

  1.  $(function ()    
  2. { $("#identifier").modal();    
  3. });
Now when I just use the code as is, it pulls the modal box up immediately upon page load. So I want to wrap it in an event. So I tried to use

  1. $("#register").click(function() { 
  2. $(function ()
  3. {
  4.  $("#example").modal();  
  5. });  
  6. });

When I click the link with the #id, it pulls up the box then it disappears. Any thoughts on that? If I can't get this to work does anyone else have better modal/dialog/lightbox form solutions so I can finally get this over with? Thanks in advance.