I'm facing an issue with my website where, upon clicking the contact link in the navigation bar, a contact box slides down and the navigation bar moves below it. However, when the contact link is clicked again to hide the contact box, the navigation bar remains in its moved position as if the contact box is still visible. Below is the code snippet:
contactBarBtn.click(function (e) {
search_close();
contactBar.toggle();
navbarFixedTop.animate({ top: contactBar.height() }, 'slow'),
contactBar.animate({ top: '0' }, 'slow'),
contactCorner.css('display', 'block'),
e.preventDefault();
return false;
});
Any suggestions on how to fix this?