I would like to know if it is possible to create multiple bindings on an event in knockout.js
example:
<span data-bind="click: function1 function2, attr: {}"></span>
I would like to know if it is possible to create multiple bindings on an event in knockout.js
example:
<span data-bind="click: function1 function2, attr: {}"></span>
How 'bout custom simple binding
clickArray
:Then you wrap some HTML:
…and make a model:
Working fiddle: https://jsfiddle.net/hejdav/qmfem8t3/6/
I tried this in my code and it seems to work:
EDIT: I accidentally used the MooTools typeOf() without thinking. Fixed.
Here's what I came up with. I admit it's overkill for most situations but the syntax is a bit cleaner on the template side:
View Model:
and template
Try to use