The situation is as follows: When you navigate through the menu, the corresponding section is displayed.
// Bind the navigation menu links $("#linkHome").click(showHomeView); $("#linkLogin").click(showLoginView); $("#linkLogout").click(logoutUser); When authorizing or logging out of an account, there is a corresponding message as well as in case of authorization error:
function showInfo(message) { $('#infoBox').text(message); $('#infoBox').show(); setTimeout(function() { $('#infoBox').fadeOut(); }, 3000); } function showError(errorMsg) { $('#errorBox').text("Error: " + errorMsg); $('#errorBox').show(); setTimeout(function() { $('#errorBox').fadeOut(); }, 3000); } Tell me how to remove the message $ ('# errorBox'). Hide () if at the time of the display the user moves to another section, for example Home Page.
$("#infoBox, #errorBox").hide()to transition handlers? - teran$("#linkHome").click(function(e){ showHomeView.call(this, e); ("#infoBox, #errorBox").hide(); });- Igor