I've been experimenting with some magical CSS classes from a source I found online (http://www.minimamente.com/magic-css3-animations/) and trying to apply them using jQuery on mouseenter and mouseleave events. Unfortunately, it's just not working at all!
Here's the code snippet I've tried:
$(document).ready(function(){
$('#banner-holder').on('mouseenter', function(){
$(this).find('#prev, #next').addClass('magictime perspectiveLeft');
});
$('#banner-holder').on('mouseleave', function(){
$(this).find('#prev, #next').removeClass('perspectiveLeft');
$(this).find('#prev, #next').addClass('perspectiveLeftRetourn');
});
});
The perspectiveLeft animation is triggered, but for some reason, the perspectiveLeftRetourn doesn't happen on mouse out. Have I overlooked something simple here?