title: OK and Cancel in a bootstrap modal
body: <p>I would like to implement a classic OK and Cancel concept in a bootstrap modal.</p>
  
  <pre><code>&lt;div class="modal-dialog" role="document"&gt;
  &lt;div class="modal-content"&gt;
    &lt;div class="modal-header"&gt;
      &lt;button type="button" class="close" data-dismiss="modal" aria-label="Close"&gt;&lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;&lt;/button&gt;
      &lt;h4 class="modal-title" id="myModalLabel"&gt;Modal title&lt;/h4&gt;
    &lt;/div&gt;
    &lt;div class="modal-body"&gt;
        user can select an option here from a list
    &lt;/div&gt;
    &lt;div class="modal-footer"&gt;
      &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Cancel&lt;/button&gt;
      &lt;button type="button" class="btn btn-primary"&gt;OK&lt;/button&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>
                              </p>
  
  <p>In the model content, there is a  and the user can select one of the options. If OK is clicked, I would like to handle the new option. If not, no action is required. For that I hook on the hide.bs.modal event, but that is called when Cancel is clicked.</p>
  
  <p>How can I differentiate between Cancel and OK buttons?</p>