BrokeMyLegBiking BrokeMyLegBiking - 8 months ago 32
jQuery Question

jquery to serialize only elements within a div

I would like to get the same affect as jQuery.serialize() but I would like to return only the child elments of a given div.

sample result:



No problem. Just use the following. This will behave exactly like serializing a form but using a div's content instead.

$('#divId :input').serialize();

Check for a demonstration ( for the code)