How to use easeOutBack with Velocity.js

I use veloicty.js to animate elements on my site. I can use almost any other easing method except easeOutBack. I thought I read that everything is included in the library, except for the "bounce" effects.

I also included jqueryui in my project as well as my last effort to figure out if this helped. Bad luck.

Here is what I use:

$('element').mouseenter(function (event) {
    $(this).find('h2').velocity({
        'top': 20
    }, {
        'duration': 300,
        'easing': 'easeOutBack'
    });

Or is this the case when I need to manually create this effect using 2 speed calls. One to take the position of an element for 20, and then back to 20?

+4
source share
1 answer

As stated in the docs :

Velocity - jQuery UI easings, , .

, easeOutBack.

, , , : [0.175, 0.885, 0.32, 1.275] easing.

+5

Source: https://habr.com/ru/post/1605763/


All Articles