Jquery .serialize isn't registering the values of the input-fileds
<p>I am trying to serialize some data from a form. </p>

<p>The html:</p>

<pre><code>&lt;form class="span5 login navbar-form pull-right"&gt;
    &lt;input class="span2" type="text" placeholder="E-mail" /&gt;
    &lt;input class="last span2" type="password" placeholder="Lösenord" /&gt;
    &lt;a class="loginbutton span1 btn btn-zen-inverse btn-mini" href="#"&gt;Logga in&lt;/a&gt;
    &lt;br /&gt;
    &lt;a class="pull-right hidden" href="#"&gt;Glömt lösenord&lt;/a&gt;
    &lt;label class="pull-right hidden"&gt;&lt;input type="checkbox" /&gt; Kom ihåg mig&lt;/label&gt;
&lt;/form&gt;
</code></pre>

<p>Jquery:</p>

<pre><code>$(document).ready(function() {
    $('.loginbutton').click(login);
});

function login(){
  event.preventDefault();
  var params = $('form').serialize();
  console.log(params);
}
</code></pre>

<p>If i put some data in the html-fields and click the "a" tag with <code>.logintbutton</code> on it, the <code>console.log</code> is just empty, I expect it to push out the data. Whit serializeArray, I get an empty array. </p>
