title: Calling a modal after a success ajax
body: <p>Hi currently I'm using jQuery Validator plugin to validate my forms, all are running fine but when I have a success call in Ajax, I want to call a modal (bootstrap) seems is not firing the code inside success, this happened when I use the validator embedded function ifprevented, if I use e.defaultPrevent the validation works partially it triggers the PHP call ignoring the validation and modals work fine but if I use where the documentation says use the isdefaultPrevented validations work great but cant fire the modal here is the script I'm using it. Thank you in advance.</p>
  
  <pre><code>  $('#candidateForm').validator().on('submit', function(e) {
      if (e.isDefaultPrevented()) {
          // handle the invalid form...
      } else {
          var dataString = $('#candidateForm').serialize();
          $.ajax({
              type: "POST",
              url: "work/php/onlineApplication/addNewCandidate.php",
              data: dataString,
              dataType: "json",
              success: function(result) {
                  console.log(result['data'].status);
                  if (result['data'].status == 'error') {
                      $("#bodyMsgModal").html(result['data'].message);
                      $("#addUserModal").modal();
                      $(result['data'].Field).focus();
                  }
                  if (result['data'].status == 'success') {
                      $("#bodyMsgModalSuccess").html(result['data'].message);
                      $("#addUserModalSuccess").modal();
                      $('#candidateForm')[0].reset();
                  }
              }
          });
      }
  });
  </code></pre>