JSFiddle - React, Tailwind, and code Playground

by grahampcharles

HTML

<script src="http://cdn.jsdelivr.net/jquery/1.9.1/jquery-1.9.1.js"></script>
 <input type="radio" data-bind="checked: TimeType" name="Type" value="0">Time Range
 <input type="radio" data-bind="checked: TimeType" name="Type"  value="1">Time in the type of day
 <input type="radio" data-bind="checked: TimeType" name="Type" value="2">Time in days of week
 
 <input id="change" type="button" value="Change"/>

JavaScript

var vm = new AppViewModel();

$("#change").click(function () {
    vm.TimeType("2");
    alert(vm.TimeType());
});   

function AppViewModel() {
    this.TimeType = ko.observable("1");
}

ko.applyBindings(vm);