title: Can't load 2 different modal forms with JQuery Trigger
body: <p>I have some modal forms to complete some fields, in this case I have 2 modal forms, 1 for Jury and 1 for Contact, when I press 'Add' link, in both cases works fine, but the problem is when I want to edit contact.</p>
  
  <p>When I press Edit in both cases I call controller to complete the Java form and then, return to view and simulate a click in "Add" button with JQuery. In jury case works fine, but in Contact I only get a dark screen (like if modal works), but modal window never appear. Other problem is, when I press Edit button in Jury and then close the jury modal form, when I press Edit in Contact it launch the jury modal form...</p>
  
  <p><em>Contact Modal and Add link</em> (<strong>Edit link doesn't works</strong>)</p>
  
  <pre><code>&lt;div class="row margin-top-10"&gt;
      &lt;div class="col-xs-2 col-md-2 col-md-push-10"&gt;              
          &lt;a id="btnAddCForm" href="#modal-cForm-form" data-toggle="modal" class="btn fpa btn-block pull-right"&gt;A&amp;Ntilde;ADIR NUEVO&lt;/a&gt;                   
      &lt;/div&gt; 
  &lt;/div&gt;
  
  &lt;div id="modal-cForm-form" class="modal fade" tabindex="-1" aria-hidden="true"&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" aria-hidden="true"&gt;&lt;/button&gt;
                  &lt;h4 class="modal-title"&gt;Nuevo/Editar Forma de contacto&lt;/h4&gt;
              &lt;/div&gt;
              &lt;div class="modal-body"&gt;
                  &lt;div class="scroller" style="height:390px" data-always-visible="1" data-rail-visible1="1"&gt;
                        Some fields
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="modal-footer"&gt;
                  &lt;button type="button" data-dismiss="modal" class="btn default"&gt;CANCELAR&lt;/button&gt;
                  &lt;button type="button" onclick="addContactForm();" class="btn fpa"&gt;ACEPTAR&lt;/button&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><em>Jury Modal and Add link</em> (<strong>Works fine</strong>)</p>
  
  <pre><code>&lt;div class="row margin-top-10"&gt;
      &lt;div class="col-xs-2 col-md-2 col-md-push-10"&gt;              
          &lt;a id="btnAddJurado" href="#modal-jury-form" data-toggle="modal" class="btn fpa btn-block pull-right"&gt;A&amp;Ntilde;ADIR NUEVO&lt;/a&gt;                   
      &lt;/div&gt; 
  &lt;/div&gt;
  
  &lt;div id="modal-jury-form" class="modal fade" tabindex="-1" aria-hidden="true"&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" aria-hidden="true" onclick="resetValues();"&gt;&lt;/button&gt;
                  &lt;h4 class="modal-title"&gt;Nuevo/Editar Jurado&lt;/h4&gt;
              &lt;/div&gt;
              &lt;div class="modal-body"&gt;
                  &lt;div class="scroller" style="height:300px" data-always-visible="1" data-rail-visible1="1"&gt;
                      Some Fields
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="modal-footer"&gt;
                  &lt;button type="button" data-dismiss="modal" onclick="resetValues();" class="btn default"&gt;CANCELAR&lt;/button&gt;
                  &lt;button type="button" onclick="addJury();" class="btn fpa"&gt;ACEPTAR&lt;/button&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><em>Onload</em> (In main html document)</p>
  
  <pre><code>window.onload = function () {
  
      /*&lt;![CDATA[*/
      var idJuryAux = /*[[${person.juryAux.id}]]*/
      null;
      var idContactFormAux = /*[[${person.contactFormAux.id}]]*/
      null;
      /*]]&gt;*/
  
      var idProvincia = $('#provinceField').val();
      var idPais = $('#countryField').val();
      if (idPais == '-1') {
          $('#provinceField').attr("readonly", true);
      } else {
          $('#provinceField').attr("readonly", false);
      }
      if (idProvincia == '-1') {
          $('#cityField').attr("readonly", true);
      } else {
          $('#cityField').attr("readonly", false);
      }
      if (idJuryAux != null) {
          /*&lt;![CDATA[*/
          var idCat = /*[[${person.juryAux.category}]]*/
          null;
          var idCargo = /*[[${person.juryAux.juryType}]]*/
          null;
          var catName = /*[[${person.juryAux.categoryName}]]*/
          null;
          var cargoName = /*[[${person.juryAux.juryTypeName}]]*/
          null;
          /*]]&gt;*/
          $('#btnAddJurado').trigger('click');
          $("#categoryField").select2('data', {
              id: idCat,
              text: catName
          });
          $("#juryTypeField").select2('data', {
              id: idCargo,
              text: cargoName
          });
      }
      if (idContactFormAux != null) {
          /*&lt;![CDATA[*/
          var idType = /*[[${person.contactFormAux.type}]]*/
          null;
          var typeName = /*[[${person.contactFormAux.typeName}]]*/
          null;
          var idTag = /*[[${person.contactFormAux.tag}]]*/
          null;
          var tagName = /*[[${person.contactFormAux.tagName}]]*/
          null;
          var idPais = /*[[${person.contactFormAux.country}]]*/
          null;
          var paisName = /*[[${person.contactFormAux.countryName}]]*/
          null;
          var idProvincia = /*[[${person.contactFormAux.province}]]*/
          null;
          var provName = /*[[${person.contactFormAux.provinceName}]]*/
          null;
          var idCity = /*[[${person.contactFormAux.city}]]*/
          null;
          var cityName = /*[[${person.contactFormAux.cityName}]]*/
          null;
          var idInst = /*[[${person.contactFormAux.institution}]]*/
          null;
          var instName = /*[[${person.contactFormAux.institutionNme}]]*/
          null;
          /*]]&gt;*/
  
          $('#btnAddCForm').trigger('click');
          $("#typeField").select2('data', {
              id: idType,
              text: typeName
          });
          $("#tagField").select2('data', {
              id: idTag,
              text: tagName
          });
          $("#countryField").select2('data', {
              id: idPais,
              text: paisName
          });
          $("#provinceField").select2('data', {
              id: idProvincia,
              text: provName
          });
          $("#cityField").select2('data', {
              id: idCity,
              text: cityName
          });
          $("#institutionField").select2('data', {
              id: idInst,
              text: instName
          });
      }
  }
  </code></pre>
  
  <p>P.S. addJury(); and addContactForm(); only closes modal window, both works fine!</p>
  
  <p>EDIT: I'm still waiting for a response...</p>