Sha256: 911d3cca45f88e5af8c6c9c3415f9ed7de35a964319775a0c5d748dfdba8854f

Contents?: true

Size: 400 Bytes

Versions: 2

Compression:

Stored size: 400 Bytes

Contents

$.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 || '');
        } else {
            o[this.name] = this.value || '';
        }
    });
    return o;
};

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mercury-rails-0.1.1 vendor/assets/javascripts/jquery.serialize_object.js
mercury-rails-0.1.0 vendor/assets/javascripts/jquery.serialize_object.js