JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://ajax.aspnetcdn.com/ajax/knockout/knockout-3.0.0.js"></script>
<div data-bind="template: {afterRender: MA.initApp}" id="MyView">
<ul data-bind="foreach: items">
<li data-bind="text: $data"></li>
</ul>
</div>
JavaScript
// "My App"
MA = {};
// Callback function for when KO has finished.
// Do jQuery stuff here - as an example, turn the background red.
MA.initApp = function() {
$("li").css("background-color", "red");
}
// A simple view model
MA.view_model = {
items: ["one", "two", "three", "four"]
}
// On document.ready, apply the KO bindings. KO will render, and
// then when it is done, the afterRender callback will do the jQuery
// work to turn the items red.
$(document).ready(function() {
ko.applyBindings(MA.view_model, $("#MyView")[0]);
});