22 May 2014

AaronK just met a little jQuery problem and googled the answer. We already know jQuery provide a easy method to serialize all the input elements became a parameter string, such as

$('#new_post_form').serialize()

But what if we want to just serialize partial input elements inside some div (or non-form element). Then we can just use

$('#div input').serialize()