<div id="box" style="width:100px;height:100px;background:red;"></div>
<button id="moveBtn">Move Box</button>
<script>
$(document).ready(function(){
$("#moveBtn").click(function(){
$("#box").animate({left: '250px'}, 1000);
});
});
</script>
.animate()
allows you to animate CSS properties (e.g., move, resize, opacity).
Leave a Reply