JSFiddle - React, Tailwind, and code Playground
by kmburke84
HTML
<link rel="stylesheet" href="IA05.css">
<section id="container">
<div class="click">
CLICK HERE
</div>
<div class="box">
</div>
</section>
<script src="IA05.js"></script>
CSS
@charset "UTF-8";
#container {
width:100%;
height:100%;
}
.box {
width:200px;
height:200px;
background-color:#0000FF;
border-radius: 50%;
position:relative;
}
JavaScript
$(document).ready(function(){
$('.click').click(function(){
$('.box').animate({
marginLeft:'100%'} ,1500)
});
});