Created
March 5, 2012 19:29
-
-
Save e1senh0rn/1980508 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AdminVacationSorter = function(selector) { | |
var selector = selector; | |
var sortable = null; | |
var options = { | |
axis: 'y', | |
containment: 'parent', | |
cursor: 'move', | |
update: update_handler, | |
helper: ui_helper | |
}; | |
var initialize = function() { | |
sortable = $(selector).sortable(options).disableSelection(); | |
}; | |
var update_handler = function(event, ui) { | |
console.log(event); | |
console.log($(this)); | |
}; | |
var ui_helper = function(event, ui) { | |
ui.children().each(function() { | |
$(this).width($(this).width()); | |
}); | |
return ui; | |
}; | |
initialize(); | |
} |
viart
commented
Mar 5, 2012
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment