macek/jquery-serialize-object

Undefined 'serializeObject' in jQuery

losewin opened this issue · 0 comments

For those who has the same issue, which the jquery-serialize-object is not being added on jQuery.fn, this is the work around

require('../../bower_components/jquery/dist/jquery.min.js')
const serialize=require('../../bower_components/jquery-serialize-object/dist/jquery.serialize-object.min.js')

const $=jQuery;

$.fn.serializeObject = serialize.FormSerializer.serializeObject;
$.fn.serializeJSON   = serialize.FormSerializer.serializeJSON;