title: How to serialize a form in jquery for use in url hash without submitting form?
body: <p>I want to create a string representation of certain html forms for storing in the hash portion of the url.</p>
  
  <p>I was lazily hoping that there would be such a method and jquery. serialize() seems to do the trick, except that in all the examples I've seen, it uses the 'this' object of a form submission. On my site the forms aren't getting submitted, I just want to be able to serialize them. I've tried:</p>
  
  <pre><code>params['formParams'] = $("#"+currentSearchForm).serialize();
  </code></pre>
  
  <p>but I just get an empty string instead of the serialized form.</p>
  
  <p>Should I spoof a form submission and generate my serialized string in it, and then cancel the default event or something? Seems a little contrived..?</p>
  
  <p>Alternatively could be I'm just doing serialize wrong..</p>
  
  <p>Thanks for your help!</p>