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.
18 lines
566 B
JavaScript
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()
|
|
})
|
|
}) |