I have an icon that when clicked adds a class to the nav-btn class and the menu animates to the full height of screen.
$('.nav-btn').click(function(){
$(this).toggleClass('open');
$('nav').animate({height: '100vh'});
});
When I try and close the menu by calling both the original and added class, it is unresponsive.
$('.nav-btn.open').click(function(){
console.log('test');
$('nav').animate({height: '60px'});
});
I can't even see the console.log in the console so I'm thinking that I'm not calling the class correctly but I have tried a few combinations and nothing works and from reading other peoples issues I'm calling the call correctly. Please help!