I have a backbone.js project I have been working on, and I have it setup so that I can drag and drop rows (which are backbone.js models) and with the help of the jQuery UI update event I am able to make my models re-figure their order and everything is well. I was wondering if anyone new a cleaner way to make this happen. I have included some code below.
$( ".section" ).sortable({items: 'tr', update: function()
{
console.log("Event Fire!");
secv.mySort();
}});
secv is my View for the model that holds the table. The mySort function goes through and figures out the order of the elements and does the necessary updating.