Created
October 15, 2012 02:00
-
-
Save dealingwith/3890461 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
// be able to sort show list | |
$("#showlist_list").sortable(); | |
// reapply zebra striping to show list after resorting | |
$("#showlist_list").bind("sortupdate", function(event, ui) { | |
// construct order array | |
var sort_array = []; | |
$("#showlist_list li").each(function(){ | |
var id = $(this).attr("id").split("_")[1]; | |
sort_array.push(id); | |
}); | |
// update model | |
showModel.sortModel(sort_array); | |
showModel.save(); | |
addZebraStripes("#showlist_list li"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment