JSFiddle - React, Tailwind, and code Playground

by blashadow

HTML

<script src="http://cloud.github.com/downloads/SteveSanderson/knockout/knockout-2.0.0.js"></script>
<div id="buttonList">
</div>

<button data-bind="text:nombre">Add a button</button>
<h1 data-bind=" text: nombre "></h1>

JavaScript

var system = function()
{
    var self = this,
        $list = document.getElementById("buttonList");
    
    this.nombre = "Luis";

    this.hello = function()
    {
        alert("hello");
    }  
        
    this.makeUI = function()
    {      
        alert("Hola");
        var div = document.createElement("div");
        div.innerHTML = "<button data-bind='click: alert(5)'>Click</button>";  
        $list.appendChild(div);
        ko.applyBindings(new system(), div);
    }
}
    
       ko.applyBindings(new system());