JSFiddle - React, Tailwind, and code Playground

by shyamselvan

HTML

<div id="container">
<div id="box-main"></div>
<div id="arrow-hover"></div>
    <footer></footer>
</div>

CSS

#container
{
    margin:0;
    width:100%;
    height:100%;
}

#box-main{
    position: fixed;
    left:150px;
    bottom: -150px;
    width: 250px;
    height: 150px;
    background: #000;
    z-index: 100;
}
#arrow-hover{
    position: fixed;
    bottom: 50px;
    left: 250px;
    width: 50px;
    height: 50px;
    background: blue;
    z-index: 100;

}
footer
{
    width:100%;
    background:green;
    height:50px;
    bottom:0;
    left:0;
    position:absolute;
    z-index:500;
}

JavaScript

$('body').on('click','#arrow-hover',function(){
    $('#arrow-hover').animate({
        bottom: '200px'
    },250);
    $('#box-main').animate({
        bottom: '50px'
    },250);
});



$('body').on('click','#box-main',function(){
    $('#arrow-hover').animate({
        bottom: '50px'
    },250);
    $('#box-main').animate({
        bottom: '-150px'
    },250);
});