JSFiddle - React, Tailwind, and code Playground

by trek711

HTML

<div id="wrap">
    <div id="left"></div>
    <div id="righttop">
        <div id="click">Click!</div>
        <div id="box"></div>
        <div id="place"></div>
    </div>
    <div id="rightbot"></div>
</div>

CSS

#wrap {
    width: 700px;
    height: 500px;
    padding: 5px;
    background-color: yellow;
    border: 1px solid black;
}
#left {
    width: 395px;
    height: inherit;
    float: left;
    margin: 0 5px 0 0;
    background-color: red;
}

#righttop {
    float: left;
    padding: 5px;
    width: 290px;
    background-color: green;
}

#rightbot {
    float: left;
    margin: 5px 0 0 0;
    width: 300px;
    height: 60%;
    background-color: blue;
}
#click {
    width: 50px;
    height: 50px;
    background-color: red;
}
#box {
    width: 200px;
    height: 100px;
    background-color: white;
    display: none;
}
#place {
    width: 100px;
    height: 120px;
    background-color: lightgrey;
}

JavaScript

$("#click").on("click", function (e) {
	    $("#box").slideToggle("fast");
	});