I have a custom jQuery widget that is being called from my app that uses backbone.js for MVC. How can I use the backbone events pattern in my custom jQuery widget?
function( $ ) {
$.widget( "medex.chooser", {
...
_create: function() {
// Would I create a new backbone view here???
}
}
Thanks.
I think you need to define a custom View that is then called by your custom widget.
In your app initialization code, for example:
Then this will be the constructor code for your widget:
This code might not be entirely valid, but should give you an idea of the structure you were looking for. Lemme know if this works for you.