2 * @class jQuery.plugin.getAttrs
5 function serializeControls( controls ) {
10 for ( i = 0; i < len; i++ ) {
11 data[ controls[ i ].name ] = controls[ i ].value;
18 * Get the attributes of an element directy as a plain object.
20 * If there is more than one element in the collection, similar to most other jQuery getter methods,
21 * this will use the first element in the collection.
25 jQuery.fn.getAttrs = function () {
26 return serializeControls( this[ 0 ].attributes );
30 * Get form data as a plain object mapping form control names to their values.
34 jQuery.fn.serializeObject = function () {
35 return serializeControls( this.serializeArray() );
40 * @mixins jQuery.plugin.getAttrs