title: Set Bootstrap Modal text dynamically?
body: <p>I'm trying to set the modal text after it's been launched by a jQuery click event, but I'm unsuccesful. Can somebody give me some pointers?</p>
  
  <p>I have tried setting the title, body and button dynamically, but for some reason it's not added.</p>
  
  <pre><code>$(function() {
      $(".contact-input-plus").on( "click",  "a", function() {
          if ( ! $(this).is(".remove")) {
             // Do stuff
          } else {
              $('#confirm').modal('show');
              $('#confirm').on('show.bs.modal', function() {
                  var modal = $(this);
                  modal.find('.modal-body p').text('You are about to remove this entry. Are you sure?');
                  modal.find('.modal-header h4').html('Remove entry');
                  modal.find('.modal-footer a.btn').text('Remove');
              });
  
          }
          return false;
      });
  });
  </code></pre>
  
  <p><strong>Note:</strong> I need to clarify something. The modal is displayed firstly without the text set. When I cancel and fire the modal again, the text is inserted.</p>