MinimalistFlex/js/menu.js
Frank419 e467a7032d Changed the appearance of menu, both desktop and mobile.
On desktop, the navigation menu will display normally instead of being wrapped in a modal.
On mobile, the dialog has been refined to remove the widget areas to provide better accessibilty. A focus trap is also implemented to improve accessibility.
2024-08-27 17:43:11 +08:00

18 lines
566 B
JavaScript

jQuery(document).ready(function($){
$("#menu-toggle").click(function(e){
e.preventDefault()
$(this).parent().eq(0).toggleClass("active")
})
$("#custom-menu-2-focus").click(function(e){
e.preventDefault()
})
$("body").removeClass("loading")
$(".menu-item-has-children").click(function(e){
e.preventDefault()
$(this).toggleClass("active")
$(this).parent().parent().toggleClass("active")
})
$("#minimalistflex-menu-focus-hack").focus(function(){
$("#menu-toggle").focus()
})
})