Skip to content

Instantly share code, notes, and snippets.

@mhayes
Created July 1, 2010 18:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mhayes/460325 to your computer and use it in GitHub Desktop.
Save mhayes/460325 to your computer and use it in GitHub Desktop.
Use to collect sort position from jqueryUI
$(function() {
$(".multiselect").multiselect();
$('#sortFields').sortable({
update:function(event,ui) {
var arr = $('#sortFields').sortable('toArray');
var newVal = "";
for(i=1; i<arr.length; i++) { newVal += arr[i] + ","; }
$('#sortOrderIds').val(newVal);
}
});
$('#sortFields').disableSelection();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment