JSFiddle - React, Tailwind, and code Playground

HTML

<head>
<title>slide demo</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
<style>
#toggle {
width: 300px;
height:300px;
background: #ccc;
}
</style>
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
</head>
<body>
<p>Click anywhere to toggle the box.</p>
<div id="toggle" data-open="true"></div>
<script>
$(document).click(function () {
    var elemento = $("#toggle");
    elemento.animate({
        'margin-left': elemento.data('open') ? "-250px" : "0px"
    }, 500);
    elemento.data('open', !elemento.data('open')); // mudar a flag para o oposto do que estava usando o operador de negação "!"
});
</script>
</body>