Take the 2-minute tour ×

I'm toying around with backbone.js and try to use jQuery along with it. I have a view and I'd like to react to reorder event. This is my view:

var SortableList = Backbone.View.extend({
  el: '#sortable_list',
  events: {
    'sortupdate': 'onDrop',
    'click':      'onClick'
  initialize: function () {
  onDrop: function () {
  onClick: function () {

So the click event fires fine, but I just can't figure out how to track a drop/reorder/sortupdate/whatever event.

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

I don't know if this is the best method but I currently bind the view to the update method of the Sortable:

    update: _.bind(function(event, ui) {
    }, this)
share|improve this answer
Works like a charm - thanks! –  Wukerplank Nov 16 '11 at 20:09
Where do you add this? Is this in the View.initialize(...)? –  Xeoncross Jun 15 '12 at 21:36
@Xeoncross Yes, just replace the OPs empty sortable constructor. –  Nev Stokes Jun 18 '12 at 11:36
add comment

Your Answer


