Reputation: 167
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
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