title: Doing a jQuery Ajax submit, but it doesn't work
body: <p>I am trying to do a ajax post request, to also read a JSON response from the URL, but if I click the button nothing happens. What could be wrong with my HTML code or is it the Javascript? The function <code>submitRegister</code> is empty at the moment.</p>
  
  <p>Javascript:</p>
  
  <pre><code>$('#registerForm').submit(function(event){
      event.preventDefault();
      submitRegister();
  });
  
  function submitRegister(){
      console.log("Test");
  }
  </code></pre>
  
  <p>HTML</p>
  
  <pre><code>&lt;div id="RegisterM" class="modal fade" role="dialog"&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"&gt;&amp;times;&lt;/button&gt;
                  &lt;h4 class="modal-title"&gt;Register&lt;/h4&gt;
              &lt;/div&gt;
              &lt;div id='notification'&gt;
              &lt;/div&gt;
              &lt;div class="modal-body"&gt;
                  &lt;form role="form" id="registerForm"&gt;
                      &lt;div class="form-group"&gt;
                          &lt;label for="Username"&gt;Username:&lt;/label&gt;
                          &lt;input type="Username" class="form-control" id="username"&gt;
                      &lt;/div&gt;
                      &lt;div class="form-group"&gt;
                          &lt;label for="email"&gt;Email address:&lt;/label&gt;
                          &lt;input type="email" class="form-control" id="email"&gt;
                      &lt;/div&gt;
                      &lt;div class="form-group"&gt;
                          &lt;label for="pwd"&gt;Password:&lt;/label&gt;
                          &lt;input type="password" class="form-control" id="pwd"&gt;
                      &lt;/div&gt;
                      &lt;div class="form-group"&gt;
                          &lt;label for="confirmpwd"&gt;Confirm Password:&lt;/label&gt;
                          &lt;input type="confirmpwd" class="form-control" id="confirmpwd"&gt;
                      &lt;/div&gt;
                      &lt;button type="button" class="btn btn-default" id='register-submit'&gt;Register&lt;/button&gt;
                  &lt;/form&gt;
              &lt;/div&gt;
              &lt;div class="modal-footer"&gt;
                  &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/button&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>