App.Order = {
oForm : $('#order-form'),
expertMode : false,
expertModeData : null,
init : function() {
$('#toggle-expert-mode').on('click', function() {
this.switchMode();
});
}
}
How do i bind this
inside the click event handler. Also is this the right way to add an event listener, i mean inside the init method?
Doing App.Order.switchMode()
does not make sense as what happens if i change the object name?
Thanks