Jquery sortable list won't serialize, why? Jquery sortable list won't serialize, why? jquery jquery

Jquery sortable list won't serialize, why?


http://api.jqueryui.com/sortable/#method-serialize

If serialize returns an empty string, make sure the id attributes include an underscore. They must be in the form: "set_number" For example, a 3 element list with id attributes foo_1, foo_5, foo_2 will serialize to foo[]=1&foo[]=5&foo[]=2. You can use an underscore, equal sign or hyphen to separate the set and number. For example foo=1 or foo-1 or foo_1 all serialize to foo[]=1.


Jquery runs into problems when you use non-compliant ids.

Ids are not allowed to begin with a number. They can have numbers in them, just not as the first character.


(link update)hi, I stumbled across a similiar problem a few days ago, though in my case it was important to keep the order of the elements intact. I coded a small plugin which will allow you to serialize ul and ol lists of arbitrary depth and complexity:

serializeTree