title: bootstrapvalidator in ajax loaded content
body: <p>I will use bootstrapvalidator, as I am using bootstrap. It works fine, but I have some contents I will load via ajax. When these contents contains forms, bootstrapvalidator will not work. I create a little example to demonstrate.</p>
  
  <p>It bases on the formWithoutLabels.html example of the bootstrapvalidator download.</p>
  
  <p>I copy formWithoutLabels2.html to formWithoutLabels2.html and replace the content of the form with</p>
  
  <pre><code>&lt;div id="result"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>In the javascript cart I add an ajax request</p>
  
  <pre><code>$( "#result" ).load( "content.html" );
  </code></pre>
  
  <p><strong>formWithoutLabels2.html:</strong></p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;BootstrapValidator demo&lt;/title&gt;
  
  &lt;link rel="stylesheet" href="../vendor/bootstrap/css/bootstrap.css"/&gt;
  &lt;link rel="stylesheet" href="../dist/css/bootstrapValidator.css"/&gt;
  
  &lt;script type="text/javascript" src="../vendor/jquery/jquery-1.10.2.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="../vendor/bootstrap/js/bootstrap.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="../dist/js/bootstrapValidator.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div id="result"&gt;
  &lt;/div&gt;
  
  &lt;script type="text/javascript"&gt;
  $( "#result" ).load( "content.html" );
  
  
  $(document).ready(function() {
  $('#defaultForm').bootstrapValidator({
      message: 'This value is not valid',
      feedbackIcons: {
          valid: 'glyphicon glyphicon-ok',
          invalid: 'glyphicon glyphicon-remove',
          validating: 'glyphicon glyphicon-refresh'
      },
      fields: {
          username: {
              message: 'The username is not valid',
              validators: {
                  notEmpty: {
                      message: 'The username is required and can\'t be empty'
                  },
                  stringLength: {
                      min: 6,
                      max: 30,
                      message: 'The username must be more than 6 and less than 30 characters long'
                  },
                  regexp: {
                      regexp: /^[a-zA-Z0-9_\.]+$/,
                      message: 'The username can only consist of alphabetical, number, dot and underscore'
                  }
              }
          },
          email: {
              validators: {
                  notEmpty: {
                      message: 'The email address is required and can\'t be empty'
                  },
                  emailAddress: {
                      message: 'The input is not a valid email address'
                  }
              }
          },
          password: {
              validators: {
                  notEmpty: {
                      message: 'The password is required and can\'t be empty'
                  },
                  identical: {
                      field: 'confirmPassword',
                      message: 'The password and its confirm are not the same'
                  }
              }
          },
          confirmPassword: {
              validators: {
                  notEmpty: {
                      message: 'The confirm password is required and can\'t be empty'
                  },
                  identical: {
                      field: 'password',
                      message: 'The password and its confirm are not the same'
                  }
              }
          }
      }
  });
  });
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  &lt;/pre&gt;
  </code></pre>
  
  <p><strong>content.html:</strong></p>
  
  <pre><code>&lt;div class="container" style="margin-top: 50px;"&gt;
      &lt;div class="row"&gt;
          &lt;div class="col-lg-4 col-lg-offset-4"&gt;
              &lt;div class="panel panel-default"&gt;
                  &lt;div class="panel-heading"&gt;
                      &lt;h3 class="panel-title"&gt;Sign up&lt;/h3&gt;
                  &lt;/div&gt;
  
                  &lt;div class="panel-body"&gt;
                      &lt;form id="defaultForm" method="post"&gt;
                          &lt;div class="form-group"&gt;
                              &lt;input type="text" class="form-control" name="username" placeholder="Username" /&gt;
                          &lt;/div&gt;
  
                          &lt;div class="form-group"&gt;
                              &lt;input type="text" class="form-control" name="email" placeholder="Email" /&gt;
                          &lt;/div&gt;
  
                          &lt;div class="form-group"&gt;
                              &lt;input type="password" class="form-control" name="password" placeholder="Password" /&gt;
                          &lt;/div&gt;
  
                          &lt;div class="form-group"&gt;
                              &lt;input type="password" class="form-control" name="confirmPassword" placeholder="Retype password" /&gt;
                          &lt;/div&gt;
  
                          &lt;div class="form-group"&gt;
                              &lt;button type="submit" class="btn btn-primary"&gt;Sign up&lt;/button&gt;
                          &lt;/div&gt;
                      &lt;/form&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>In this example bootstrapvalidator does not work. What do I need to do, that it works within the ajax request?</p>
  
  <p>Any ideas?</p>