tags:

views:

269

answers:

1

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:

single=Single2&multiple=Multiple&radio=radio1
+4  A: 

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

$('#divId *').serialize();

Check http://jsbin.com/azodo for a demonstration (http://jsbin.com/azodo/edit for the code)

jitter
sweet! I love easy answers!
BrokeMyLegBiking