Jquery sortable('serialize')

前端 未结 6 1541
遥遥无期
遥遥无期 2021-02-01 08:57

Is it possible to get the serialized list of items from a UL in jquery by calling the serialize method directly instead of using a callback? The code snippet:

va         


        
6条回答
  •  一向
    一向 (楼主)
    2021-02-01 09:42

    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.

    Above one is a example. that i used it. That is why I saw 2 you.

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

    it migth be help you.

提交回复
热议问题