Hi,
I have a scenario where I am trying to capture the enter key and trigger a bound click event for a view model. The javascript is as follows:
and mybutton is bound as such:
and the view model has a property named "AddPerson" that works fine when clicking the button, but does not work when issuing a jquery trigger("click")
Any ideas?
Thanks,
David A.
I have a scenario where I am trying to capture the enter key and trigger a bound click event for a view model. The javascript is as follows:
$form.on("keydown", function (e) { if (e.keyCode == 13) { $("#mybutton").trigger("click"); } });data-bind="click: AddPerson"Any ideas?
Thanks,
David A.