title: jQuery form serialize - just returns an empty string
body: <p>I am not getting any data from serializing my html form. Here is the form</p>
  
  <pre><code>&lt;form method="post" action="#" name='basicForm' id='basicForm'&gt;
  
  &lt;input type="text" name="n_username" id="id_username" class="form-control uname" placeholder='Username' value='test_user' data-msg-required='The input field is required.' data-rule-required='true'/&gt;
  
  &lt;input type="password" name="n_password" id="id_password" class="form-control pword" placeholder='Password' value='xxxx' data-msg-required='The input field is required.' data-rule-required='true'/&gt;                  
  
  &lt;button class="btn btn-success btn-block"&gt;Sign In&lt;/button&gt; &lt;/form&gt;
  </code></pre>
  
  <p>and here is the jquery</p>
  
  <pre><code>jQuery(document).ready(function(){
      $("#basicForm").validate({
  
          submitHandler: function (form) {
              var request;
              var $form = $(this);
  
              var $inputs = $form.find("input, select, button, textarea");
  
              var serializedData = $form.serialize();
              alert (serializedData);  &lt;==empty
  
              $inputs.prop("disabled", true);
  
              request = $.ajax({
                  url: "./ajax/login.php",
                  type: "post",
                  data: serializedData
              });
  
              request.done(function (response, textStatus, jqXHR) {
                  // log a message to the console
                  console.log("Hooray, it worked!");
                  alert(response);
                  //window.location.replace("success.php");
               });
          }
  
  
      }); //validate
  
  });//ready
  &lt;/script&gt;
  </code></pre>
  
  <p>The data in the form is not serialised. I get an empty alert box. Also on the ajax page i postback to i print_r the $_post array and get this: Array()</p>
  
  <p>I have checked the form elements have names which seems to be the common problem. I am using this jquery version </p>
  
  <p>The validation works fine. This also works</p>
  
  <pre><code>var x = $("#id_username").val();
   var y = $("#id_password").val();
  request = $.ajax({
                  url: "./ajax/login.php",
                  type: "post",
                  //data: serializedData
                  data : {
                      username : x,
                      password: y
                      }
  </code></pre>
  
  <p>thanks in advance for any help you can give</p>