Skip to content

Instantly share code, notes, and snippets.

@stl-od
stl-od / app.js
Created April 19, 2012 07:36
An offline form experiment
$.fn.serializeObject = function()
{
var o = {};
var a = this.serializeArray();
$.each(a, function() {
if (o[this.name] !== undefined) {
if (!o[this.name].push) {
o[this.name] = [o[this.name]];
}
o[this.name].push(this.value || '');