title: add button to bootstrap modal footer dynamically by jquery
body: <p>I'm trying to add a button dynamically to the footer of a bootstrap modal.
  Is that possible? Can't find it.</p>
  
  <pre><code>&lt;div class="modal fade" id="myModalRead" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"&gt;
            &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;&lt;/h4&gt;
                &lt;/div&gt;
                &lt;div class="modal-body"&gt;&lt;p id="myModalBody"&gt;&lt;/p&gt;
                 &lt;/div&gt;
                &lt;div class="modal-footer"  id="myModalFooter" &gt;
                  &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/button&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/div&gt;
  </code></pre>
  
  <p>for example this button:</p>
  
  <pre><code>&gt; &lt;button type="button" class="btn btn-default btn-ok"
  &gt; data-dismiss="modal"&gt;Delete or whatever&lt;/button&gt;
  </code></pre>
  
  <p>jquery:</p>
  
  <pre><code> jQuery(function($) {       
  $("#myModalBody").html(text);           
  $("#myModalRead").modal('show');
      });
  </code></pre>
  
  <p>kind of </p>
  
  <blockquote>
    <p>$("#myModalFooter").addabutton();</p>
  </blockquote>