Jquery sortable list won't serialize, why?

后端 未结 3 896
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-08 18:50

I\'m implementing a sortable list of images with jquery in a Zend Framework application. I just can\'t get the .sortable(\'serialize\') method to return more than an empty s

3条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-08 19:33

    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.

提交回复
热议问题