JSFiddle - React, Tailwind, and code Playground
by David Thomas
HTML
<div id="slider">Some content or other.</div>
CSS
#slider {
width: 50%;
height: 3em;
border: 3px solid #f90;
color: #000;
background-color: #fff;
text-align: center;
}
JavaScript
$(document).ready(
function(){
$('#slider').click(
function(){
$(this)
.animate(
{
'margin-left':'1000px'
},1000,
function(){
$(this).slideUp('fast');
}
);
});
});