title: javascript error after toggle modal
body: <p>I am just new to bootstrap and I am getting a javascript error that I don't know how to manage.</p>
  
  <p>I have a datatable with checkboxes in the first column. After selecting some checkboxes, you can click on two buttons that open a modal with different messages for accepting or cancelling. But if there is no checkbox checked I show an info alert (also bootstrap) and I need to "close" the modal.</p>
  
  <p>This is the <strong>js code</strong>:</p>
  
  <pre><code>$('#actionsModal').on('show.bs.modal', function(e) {
  
      var action = $(e.relatedTarget).data('id');
      var total = $('input[id^="checkboxRol"]:checked').length;
  
      var message = "", object = "", confirmation = "";
      if(total == 0){
          $('.alert-info').show();
  
  
          // -----------------------------------------------------
          // this is the line giving the error!!!
          $('#actionsModal').modal("toggle");
          // -----------------------------------------------------
  
  
      }
      else if(total &gt; 1){
          message = "Va a " + action + " los " + total + " objetos seleccionados:";
          confirmation = "¿Desea realizar esta operación?";
      }
      else{
          message = "Va a " + action + " el objeto:";
          object = "-obtener nombre-&lt;br&gt;&lt;br&gt;";
          confirmation = "¿Desea realizar esta operación?";
      }
  
      $(e.currentTarget).find('span[id="message"]').html(message);
      $(e.currentTarget).find('span[id="object"]').html(object);
      $(e.currentTarget).find('span[id="confirmation"]').html(confirmation);
  });
  </code></pre>
  
  <p>The <strong>js error</strong> is: Uncaught RangeError: Maximum call stack size exceeded</p>
  
  <p>Any idea? Maybe I could use another type of bootstrap entities, and using just modals for simple buttons or links clicks.</p>
  
  <p>Thanks in advance!</p>