Advertisement
hejmus

Untitled

Nov 11th, 2012
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. $(".sort tbody").sortable({
  2. update: function(event, ui) {
  3.  
  4. idnum= $(this).parent().attr('id');
  5. idnum=idnum.split("-")
  6. var Order = $("#ordertable-"+idnum[1]+' tbody').sortable('toArray').toString();
  7.  
  8. $('#orderinput-'+idnum[1]).val(Order); //injecting data into hidden html form (to allow simple POST saving via sending the form) NO AJAX
  9.  
  10. // alert( $('#orderinput-'+idnum[1]).val());
  11. },
  12. helper: fixHelper
  13. }).disableSelection();
  14.  
  15.  
  16.  
  17. <table class="sort borders tight" id="ordertable-<?=$d->id?>">
  18. ...
  19. <input type="hidden" id="orderinput-<?=$d->id?>" name="orderinput-<?=$d->id?>">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement