JSFiddle - React, Tailwind, and code Playground
by Tomek
HTML
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<input data-bind="value: test"/>
<table><tbody data-bind="foreach: children">
<tr><td><input data-bind="value: prop1"/></td>
<td><input data-bind="value: prop[1]"/></td></tr>
</tbody></table>
JavaScript
function Child(){
this.prop1 = ko.observable(1);
this.prop = [ ko.observable(1), ko.observable(2)];
}
function Parent(){
this.test = ko.observable(2);
this.children = ko.observableArray([new Child(),new Child()]);
}
ko.applyBindings( new Parent() );
$("input").on('click',function(){
console.log(this, ko.contextFor(this) )
})