Add easing functions to jQuery. Based on easing equations from Robert Penner.
- Include jQuery:
<script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
- Include
jquery.easing.jsbelow it:
<script src="https://{YOUR_HOST}/jquery.easing.js"></script>
<head>
...
<script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<script src="https://{YOUR_HOST}/jquery.easing.js"></script>
...
</head>
$('#el').stop(true, false).animate({
top: 10px,
left: 10px
}, 500, 'easeOutCubic');