Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save microdesign/42158b42cdf4efbea367d25dca0b6824 to your computer and use it in GitHub Desktop.
Save microdesign/42158b42cdf4efbea367d25dca0b6824 to your computer and use it in GitHub Desktop.
$.fn.form = function() {
var formData = {};
this.find('[name]').each(function() {
formData[this.name] = this.value;
})
return formData;
};
var formData = $('#form').form();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment