JSFiddle - React, Tailwind, and code Playground

by Nicolas PUJOL

HTML

<div id="a">
</div>

CSS

.a {
    width: 400px;
    height: 400px;
    background-color: #000;
    position:relative;
}
.p {
    width: 20px;
    height: 20px;
    background-color: #fff;
    position:absolute;
    bottom: 20px;
    left: 190px;
}

JavaScript

$(function() {
    load();

    function load() {
        //preload imgs
        console.log("load");
        build();
    }

    function build() {
        $("#a").addClass("a");
        $("#a").append($('<div></div>').attr({
            class: "p",
            id: "p"
        }));

        console.log("build");
        go();
    }

    function go() {
        console.log("go");

    }
});