JavaScript jQuery UI sortable not serializing with custom attributes jquery sortable serialize example,jquery sortable serialize,jquery sortable serialize

You need key and value for serialize, but you can play with parameters to override default behavior and get wanted results.

In your case you can set the attribute, key and expression you want so that it takes the data-id and build the string with defined key and proper value. Like this:

           var postData = container.sortable('serialize', {
                attribute: 'data-id',//this will look up this attribute
                key: 'order',//this manually sets the key
                expression: /(.+)/ //expression is a RegExp allowing to determine how to split the data in key-value. In your case it's just the value

            });

Fiddle: http://jsfiddle.net/c2o3txry/

Answer:1

As far as I know open() and waitFor() require following steps to be wrapped in then(): casper.click(x('//button[text()="Login"]')); casper.waitForSelector(x('//span[text()="Navigation"]]')); casper....

As far as I know open() and waitFor() require following steps to be wrapped in then(): casper.click(x('//button[text()="Login"]')); casper.waitForSelector(x('//span[text()="Navigation"]]')); casper....

This is a very puzzling issue that I've been around the block on several times here without coming to a solution. That question was getting too complicated to take all my updates and format correctly,...

This is a very puzzling issue that I've been around the block on several times here without coming to a solution. That question was getting too complicated to take all my updates and format correctly,...

How would I call showItems() function in aspx page from code behind. <script> function getItems(){ var items = []; return items; //items=['a','b','c'] } <form id="form1" runat="server"&...

How would I call showItems() function in aspx page from code behind. <script> function getItems(){ var items = []; return items; //items=['a','b','c'] } <form id="form1" runat="server"&...

  1. call client javascript from server-side
  2. javascript call client application
  3. call javascript on client click
  4. call javascript function on client click
  5. javascript call email client
  6. call javascript function from client side
  7. call javascript function on client
  8. call web api from javascript client
  9. call server function from javascript client side
  10. javascript call client exe

I have a directive that I would like to force render when a change is made to an underlying model programmatically. $scope.$apply is idiomatic. But I am unable to get the directive to render without ...

I have a directive that I would like to force render when a change is made to an underlying model programmatically. $scope.$apply is idiomatic. But I am unable to get the directive to render without ...