function toggleNavigation(toggleElement) {
var menu = document.getElementById("user-nav");
var isExpanded = menu.getAttribute("aria-expanded") === "true";
menu.setAttribute("aria-expanded", !isExpanded);
toggleElement.setAttribute("aria-expanded", !isExpanded);
}
$(".header .icon-menu").on("click", function(e) {
e.stopPropagation();
toggleNavigation(this);
});
$(".header .icon-menu").on("keyup", function(e) {
if (e.keyCode === 13) { // Enter key
e.stopPropagation();
toggleNavigation(this);
}
});