JSFiddle - React, Tailwind, and code Playground
by nveron
HTML
<script src="https://github.com/downloads/SteveSanderson/knockout/knockout-2.1.0.js"></script>
<div data-bind="text:Nom">
<!-- ko with: a -->
<div data-bind="text:Nom">
</div>
<!-- /ko -->
</div>
CSS
ul {
border: 1px solid #CCC;
position: absolute;
}
span{
text-decoration: underline;
}
td {
cursor: pointer;
}
.selec {
background-color: #AAA;
}
JavaScript
var a = function(Nom, data){
var self = this;
this.Nom = Nom;
this.a =ko.observable(data);
}
var vm = new a("root", new a ("fils"));
ko.applyBindings(vm);