ErichBSchulz ErichBSchulz - 1 month ago 4x
jQuery Question

can you use backbone listenTo with jquery objects?

Such as those returned by


For example, can:

$('#div').on(event, callback)

be re-written as:

view.listenTo($('#div'), event, callback)


No it turns out you can't.

You've got jQuery for that.

According to tgriesser

Sorry, listenTo only applies to objects that have the Backbone.Events mixed in, so it would work on a Backbone.View, Backbone.Collection, or Backbone.Model, but not on a jQuery object.


Some folk also suggest creating a backbone view rather than using jquery events.