I've almost tried everything and even exactly copied the example: [in here][1]
However I can't get to see it work it. I've tried multiple alternations for the event binding but none of them seem to work. What can be the possible reason?
Div container;
LoadMy event binding trials;
el: '#container',
events: {
"click button": "render"
}
Also;
el: '#container',
events: {
"click button#add": "render"
}
And finally this;
el: '#container',
events: {
"click input[type=button]": "doSearch"
}
Is there any possibility of that I'm doing this wrong. Besides if I get it to work, would it be possible to assign click event for each function in the div, giving their id's instead of a more general "click button": "render"?
NOTE: I couldn't get the html code wrapped in code tag.
onfunction for the elements which are dynamically are been added to the DOM after the view is rendered. For exampleinitialize: function() { this.$el.on('click', 'button', handler); }