PHP Classes

File: wordpress/wp-includes/js/jquery/jquery.serialize-object.js

Recommend this page to a friend!
  Classes of Faris AL-Otabi   WordPress Docker Swarm   wordpress/wp-includes/js/jquery/jquery.serialize-object.js   Download  
File: wordpress/wp-includes/js/jquery/jquery.serialize-object.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: WordPress Docker Swarm
Deploy WordPress to multiple containers
Author: By
Last change:
Date: 27 days ago
Size: 769 bytes
 

Contents

Class file image Download
/*! * jQuery serializeObject - v0.2-wp - 1/20/2010 * http://benalman.com/projects/jquery-misc-plugins/ * * Copyright (c) 2010 "Cowboy" Ben Alman * Dual licensed under the MIT and GPL licenses. * http://benalman.com/about/license/ */ // Whereas .serializeArray() serializes a form into an array, .serializeObject() // serializes a form into an (arguably more useful) object. (function($,undefined){ '$:nomunge'; // Used by YUI compressor. $.fn.serializeObject = function(){ var obj = {}; $.each( this.serializeArray(), function(i,o){ var n = o.name, v = o.value; obj[n] = obj[n] === undefined ? v : Array.isArray( obj[n] ) ? obj[n].concat( v ) : [ obj[n], v ]; }); return obj; }; })(jQuery);