Such as those returned by $("#mystuff")
etc?
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 theBackbone.Events
mixed in, so it would work on aBackbone.View
,Backbone.Collection
, orBackbone.Model
, but not on a jQuery object.
dang.
Some folk also suggest creating a backbone view rather than using jquery events.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With