Move the <div> element 250 pixels to the right using animation - Javascript jQuery

Javascript examples for jQuery:Animation

Description

Move the <div> element 250 pixels to the right using animation

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $("div").animate({left: '250px'});
});/*from   ww  w . j av  a  2  s  . c om*/
</script>
</head>
<body>

<div style="background:#98bf21;height:100px;width:100px;position:absolute;"></div>

</body>
</html>

Related Tutorials