Mouse6541
Mouse6541

Reputation: 167

Javascript events and Velocity JS

I am currently learning how to use Velocity JS, but I really don't understand if I am "allowed" to use Javascript events to trigger velocity animations. I don't see any cases of this being done in the documentation.

Upvotes: 0

Views: 579

Answers (1)

SomeBloke
SomeBloke

Reputation: 61

I have extensively used events to perform Velocity.js animations. There's nothing wrong or disallowed about doing so.

$('.some-element').click(function () {
    $(this).velocity("fadeOut", {
        delay: 500, duration: 1500
    });
});

Upvotes: 1

Related Questions