JSFiddle - React, Tailwind, and code Playground
by Grig
HTML
<div id="popup">
<form>
<h3>Приветствие</h3>
<input />
<input />
<button> Отправить </button>
</form>
</div>
CSS
*{
box-sizing: border-box;
}
#popup{
padding-left: 10px;
background: yellow;
height: 500px;
width: 300px;
position: fixed;
bottom: -440px;
right: 0;
border: 1px solid black;
}
input{
margin: 15px;
margin-left: 50px;
}
JavaScript
var flag=false;
$(document).ready(function(){
$('#popup').click(function(){
if(flag){
$(this).animate({
'bottom':'-440px'
},3000);
flag=false;
}else{
$(this).animate({
'bottom':'0'
},3000);
flag=true;
}
});
});