I'm using bind
to call the function with parameters from my view:
<span data-bind="click: modifyByOne.bind($data, 'plus')"></span>
As per this answer I'm getting the event
object by doing this:
self.modifyByOne = function(type){
var span = $(event.currentTarget);
};
In Chrome everything works ok, but in Firefox I get the following console error:
event is not defined
How can I get it working in Firefox too? Knockout documentation doesn't provide much answers to this.