Hey guys basically I am trying to animate a menu in, and then animate it out showing both animations. The problem is if I add display none it skips the out animation. How can I run the out animation then display none?
Here is the code –
$(‘#menu’).toggle(
function(){
$(“.menu”).removeClass(“animated rollOut”);
$(“.menu”).addClass(“animated flipInX”);
$(“.menu”).css(“display”,”block”);
},
function(){
$(“.menu”).removeClass(“animated flipInX”);
$(“.menu”).addClass(“animated rollOut”);
$(“.menu”).css(“display”,”none”); <– if i add this it skips the rollOut animation
});