Skip to content

Instantly share code, notes, and snippets.

@dgg
Created August 30, 2013 07:46
Show Gist options
  • Save dgg/6387271 to your computer and use it in GitHub Desktop.
Save dgg/6387271 to your computer and use it in GitHub Desktop.
Model binding dynamic collections. III sortable
DGON_DOTNET.ClientInteraction =
{
makeSortable: function (tableSelector, options) {
options = optionsWithDefaults(options, {
handleSelector: '.handle',
sortSelector: '.data-sort'
});
var tbody = $(tableSelector + ' tbody');
$(tbody).sortable({
helper: maintainWidth,
handle: options.handleSelector,
stop: function (e, ui) {
reorder(e.target.rows, options.sortSelector);
}
});
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment