Just another WordPress site

Serialize form data using jQuery

Serialize form data using jQuery helps in getting form element data easy. function getFormData(form) { var rawJson = form.serializeArray(); var model = {}; $.map(rawJson, function (n, i) { model[n[‘name’]] = n[‘value’]; }); return model; }…Continue Reading