JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<div class="janela">
</div>
CSS
.janela{
width: 100px;
height: 100px;
border:1px solid #f00;
margin-top: -90px;
position:fixed;
}
JavaScript
$(function(){
alert($(".janela").css('margin-top'));
$(".janela").click(function() {
var pos = parseInt($(this).css('margin-top').replace("px", ""));
if(pos == 0){
$(this).animate({
marginTop: -90
}, 1500 );
}else{
$(this).animate({
marginTop: 0
}, 1500 );
}
});
});