There is a 'View' in the model with the event click
. After using the Quicksand effects plug-in for jQuery, the objects loose their event handlers. I have tried to add the listener for the event with standard methods in backbone.js:
events: {
"click .objContact" : "openChat"
}
and the same tools jQuery delegate
:
var self=this;
this.$el.delegate('.objContact','click', function(){
self.openChat();
});
and live
:
var self=this;
this.$el.find('.objContact').live('click', function(){
self.openChat();
});
but the click
event disappears.
What could be the problem? And how do I solve it?
UPD: Calling 'Quicksand' is in Backbone.Router (subject to change is obtained directly by means of jQuery, not Backbone), so changes are not handled in Backbone.View
UPD 2: The problem is solved in the following way - by moving the handling of the click
event from the View-model to View-collection. And treated with live (did not work in on
)