Posted By

bLeveque on 11/22/10


Tagged

jquery serialize


Versions (?)

Own serialization for jQuery Sortable


 / Published in: jQuery
 

If your sortable.serialize() method doesn't work properly, do it by yourself ;-)

  1. $('#sortable').sortable({
  2. placeholder: 'ui-state-highlight',
  3. update : function ()
  4. {
  5. var serial = '';
  6. $('#sortable li.ui-state-default').each(function (key, value) { serial += $(value).attr('id')+'='+parseInt(key+1)+'&'; });
  7. $.ajax({
  8. url: 'ajax.php',
  9. type: 'POST',
  10. data: serial,
  11. });
  12. }
  13. });

Report this snippet  

You need to login to post a comment.