I'm trying to use some magic css classes in some code (http://www.minimamente.com/magic-css3-animations/) and trying to add them with jquery with mouseenter and mouseleave however its not working... at all!
Below is the code i have 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');
});
});
It triggers the perspectiveLeft, but on mouse out it doesnt do the perspectiveLeftRetourn. Am i making a simple mistake?
$(this).find('#prev, #next'). Isn't$('#prev, #next')enough ?