title: PHP while loop not working in modal from Bootstrap
body: <p>Hi in my script I use an Bootstrap modal. The Problem is that I take it in an while - function. The first link for modal works good... open the modal and all.. but not the second, third.... there I can click on the link and nothing happens... anyone an idea?</p>
  
  <pre><code>    &lt;?php while($row = mysql_fetch_array($data)){?&gt;
      &lt;td&gt;&lt;a href="#&lt;?php echo $row['id']; ?&gt;" class="glyphicons no-js file_export" id="modal_ajax_demo_btn_&lt;?php echo $row['id']; ?&gt;" data-toggle="modal" title="Testversand"&gt;&lt;i&gt;&lt;/i&gt;&lt;/a&gt;&lt;/td&gt;
  
  &lt;div id="ajax-modal-&lt;?php echo $row['id']; ?&gt;" class="modal hide fade" tabindex="-1"&gt;&lt;/div&gt;
  
          &lt;script type="text/javascript"&gt;
          var UIModals = function () {
  
          var initModals = function () {
  
          $.fn.modalmanager.defaults.resize = true;
          $.fn.modalmanager.defaults.spinner = '&lt;div class="loading-spinner fade" style="width: 200px; margin-left: -100px;"&gt;&lt;img src="assets/img/ajax-modal-loading.gif" align="middle"&gt;&amp;nbsp;&lt;span style="font-weight:300; color: #eee; font-size: 18px; font-family:Open Sans;"&gt;&amp;nbsp;Ladevorgang...&lt;/div&gt;';
  
  
          var $modal = $('#ajax-modal-&lt;?php echo $row['id']; ?&gt;');
  
  
          $('#modal_ajax_demo_btn_&lt;?php echo $row['id']; ?&gt;').on('click', function(){
          // create the backdrop and wait for next modal to be triggered
          $('body').modalmanager('loading');
          user_id = $(this).attr('href').replace(/^#/,'');
          setTimeout(function(){
  
          $modal.load('send1.de', '', function(){
          $modal.modal();
          });
          }, 1000);
          });
  
          $modal.on('click', '.update', function(){
          $modal.modal('loading');
          setTimeout(function(){
  
          $.ajax({
          type: "POST",
          url: "send.php",
          data: "id=" + user_id + "&amp;email=" + $("#email").val(),
          success: function(msg)
          {
          $modal
          .modal('loading')
          .find('.modal-body')
          .prepend('&lt;div class="alert alert-success fade in"&gt;' +
          'All good!&lt;button type="button" class="close" data-dismiss="alert"&gt;&lt;/button&gt;' +
          '&lt;/div&gt;');
          }
          });return false; 
  
          }, 5000);
          }); 
  
          }
  
          return {
          init: function () {
          initModals();
          }
  
          };
  
          }();
          &lt;/script&gt;
          &lt;/tr&gt;
          &lt;?php } ?&gt; 
  </code></pre>