Below is a snippet of my jQuery code:
$(function () {
$('.mnav a').click(function () {
el = $('.border');
el.addClass('blink');
el.one('webkitAnimationEnd oanimationend msAnimationEnd animationend',
function (e) {
el.removeClass('blink');
});
});
});
This code adds a class to an element for an animation, then removes that class after the animation runs. This results in the element animating every time a link is clicked.
The animation is applied to elements within the <%- body %> tag of my layouts.ejs file. When navigating from the '/' route to '/users/new', it seems like the animation is triggered on the '/' route even though it's not visible because I'm now on the '/users/new' route.
I want the animation effect to occur while transitioning to the new route when a user clicks on the login link.
Is there a way to resolve this issue?