title: How do you specify the primary and secondary actions for a Bootstrap modal window?
body: <p>I'm using <a href="http://twitter.github.com/bootstrap/javascript.html#modal" rel="noreferrer">Twitter's Bootstrap modal functionality</a>. When someone clicks submit on my form, I'm testing to see if they have checked any of the available options:</p>
  
  <pre><code>$('form').submit(function(event) {
          var $target = $('.column').find(':checkbox');                                                        
          if( !$target.is(':checked') ){ // if none of the sub-options are checked
              event.preventDefault();
              $('#my-modal').modal({
                  show: 'true',
                  backdrop: 'true',
                  keyboard: 'true'
              });
          }                                       
      });
  </code></pre>
  
  <p>... and showing the modal window if they haven't. I'd then like the 'primary' button on the modal to continue with the form submit, and the secondary button to simply close the modal window. </p>
  
  <p>I'm sure this should be fairly trivial to accomplish, but my current knowledge of jQuery is only at the copy/paste level, and the documentation doesn't give an example of how to do this.</p>
  
  <p>I've set up a jsFiddle of what I have <a href="http://jsfiddle.net/cherryflavourpez/nVRAV/" rel="noreferrer">here</a> - thanks.</p>
  
  <p><strong>EDIT</strong> - I've added below some code (it feels a bit hacky) that will close the modal window when the secondary button is clicked. Still not sure how to give the form the go ahead when the primary button is clicked:</p>
  
  <pre><code>$('#my-modal .secondary').click(function() {
      $('#my-modal').modal({
          show: 'false'
      });
  });
  </code></pre>
  
  <p><strong>The question now comes down to</strong>: 'is there a simple way to tell the form "okay, carry on" once the primary button is clicked?'</p>