Hi,
I use Javascriptmvc (whatever version is latest)
I have a controller which has click events associated with css classes( for anchor tags).This anchor tags will be available on the dom after the page is loaded through the init method of controller. The anchor tags are child of the tag that calls the controller.
My question is why does not something like this work :-
$.Controller('player', {},{
init: function(el, params) {
/*some code */
},
'.desc click': function(el, ev) {
/*some code*/
}
});
The above click event related method is never called on clicking anchor tag with desc class, once the anchor tag is available.
Whereas, something like this works :-
$.Controller('player', {},{
init: function(el, params) {
/*some code */
$('.desc').click(function(ev) {
/*some code */
});
}
});
Please help !!!