JSFiddle - React, Tailwind, and code Playground
by darknessm0404
HTML
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<div>
<span data-bind="text:client().name"></span>
</div>
<a data-bind="click: onClick">Do something</a>
JavaScript
var Item = function() {
var self = this;
this.onClick = function() {
self.client(client1);
};
this.client = ko.observable(); // undefined => not linked to another property yet
};
var client1 = {
name:'Test name',
changeableBackground: ko.observable('#00FF00')
};
ko.applyBindings(new Item());