title: Twitter Bootstrap Modal remote function not working properly
body: <p>I am using twitter boostrap and I want to get html from another page and load it into the modal of my current page. so I created a javascript function to handle this for me.</p>
  
  <p>In my 'index.php' I have this:</p>
  
  <pre><code>&lt;button onclick="popIt('create_event.php', 'Create Event');" data-toggle="tooltip" data-placement="top" data-original-title="Edit" class="btn ttp"&gt;&lt;i class="icon-pencil"&gt;&lt;/i&gt;&lt;/button&gt;
  &lt;button onclick="popIt('tester.php', 'Test Head');" data-toggle="tooltip" data-placement="top" data-original-title="Delete" class="btn btn-danger ttp"&gt;&lt;i class="icon-remove icon-white"&gt;&lt;/i&gt;&lt;/button&gt;
  </code></pre>
  
  <p>The javascript function is like so:</p>
  
  <pre><code>&lt;script&gt;
  
  function popIt(url, header) {
  
          $('#myModal').modal({
              remote: url
          });
          $('#myModalLabel').html(header);
      }
  </code></pre>
  
  <p>This loads the appropriate page when I click the button, but when I close the modal and click the other button it still loads the previous page.</p>
  
  <p>Please what am I doing wrong?
  Thanks</p>