I would like to get the same effect 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
See Question&Answers more detail:osI would like to get the same effect 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
See Question&Answers more detail:osNo problem. Just use the following. This will behave exactly like serializing a form but using a div's content instead.
$('#divId :input').serialize();
Check https://jsbin.com/xabureladi/1 for a demonstration (https://jsbin.com/xabureladi/1/edit for the code)