jQuery Animation Effect
The jQuery animate() method is a way to create custom animations. The jQuery animate() method is used to animate numeric properties of CSS. Syntax:
$(selector).animate({params}, speed, callback);
Example:
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("button").click(function(){
$("div").animate({left: '250px'});
});
});
</script>
</head>
<body>
<button>Click here to Start Animation</button>
<p>all the HTML elements are in static position by default and cannot be moved.
if you want to manipulate the position then remember to first set the CSS position property of
the element to fixed, absolute or relative!</p>
<div style="background:#98bf21;height:100px;width:100px;position:absolute;"></div>
</body>
</html>