JavaScript animate code example
Example 1: jquery animation
$( "#clickme" ).click(function() {
$( "#book" ).animate({
opacity: 0.25,
left: "+=50",
height: "toggle"
}, 5000, function() {
// Animation complete.
});
});
Example 2: animate.css
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" />
Example 3: jquery change position animate
$("#Friends").animate({
top: "-=30px",
}, duration );