JSFiddle - React, Tailwind, and code Playground
by psteele
HTML
<div>Title: <input id="name" data-bind="value: name" /></div>
<div>Author: <input id="author" data-bind="value: author" />
<input type="button" value="X" data-bind="click: show.bind($root)"></input></div>
JavaScript
var vm = {
name: 'Bob',
author: 'King',
show: function() {
alert(this.name + '-' + this.author);
}
}
ko.applyBindings(vm);