title: Change bootstrap modal title created on the fly
body: <p>I have a bootstrap modal created on the fly like this</p>
  
  <pre><code>var popupTemplate = '
  &lt;div class="modal fade"&gt;
    &lt;div class="modal-dialog"&gt;
      &lt;div class="modal-content"&gt;
        &lt;div class="modal-header"&gt;
          &lt;button type="button" class="close" data-dismiss="modal"&gt;&amp;times;&lt;/button&gt;
          &lt;h4 class="modal-title" id="dropzoneModalTitle"&gt;&lt;/h4&gt;
        &lt;/div&gt;
        &lt;div class="modal-body dropBox" id="dropzoneModalBody"&gt;&lt;/div&gt;
        &lt;div class="modal-footer"&gt;
          &lt;button type="button" class="btn btn-primary" data-dismiss="modal"&gt;Save&lt;/button&gt;
          &lt;button type="button" class="btn btn-link" data-dismiss="modal"&gt;Cancel&lt;/button&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  ';
  </code></pre>
  
  <p>then with a <code>onClick</code> listener with jquery i create a modal with that template like this</p>
  
  <pre><code>$(button).click(function(){
     $(popupTemplate).modal()
  });
  </code></pre>
  
  <p>i want to change the title of that modal created on the fly, but is not working with this</p>
  
  <pre><code>var modal = $(popupTemplate).modal();
  modal.find('.modal-title').text('HELLO');
  </code></pre>
  
  <p>any help for this?</p>