JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.1.322/styles/kendo.common.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.1.322/styles/kendo.default.min.css">
<script src="http://cdn.kendostatic.com/2012.1.322/js/kendo.all.min.js"></script>
<input data-bind="value: name" />
<button data-bind="click: submit">Save</button>
JavaScript
var viewModel = kendo.observable({
submit: function() {
// push the changes to the server
$.ajax( {
url: "/echo/json/",
type: "POST",
dataType: "json",
data: { json: JSON.stringify(this) }
});
}
});
//Retrieve the model from the remote endpoint
$.ajax({
url: "/echo/json/",
type: "POST",
dataType: "json",
data: { json: JSON.stringify( { name : "foo" } ) },
success: function(model) {
// extend the viewModel with the response from the server
$.extend(viewModel, model);
// bind to the viewModel
kendo.bind(document.body, viewModel);
}
});