Enhances the mobile header/menu layout (#663)

This commit is contained in:
2018-11-28 12:07:39 +01:00
committed by max.mehl
parent 5eb5d9e711
commit a28f198fe7
7 changed files with 288 additions and 332 deletions

View File

@@ -335,3 +335,23 @@
})
}(jQuery);
/**
* FSFE custom slide toggle for the mobile menu.
*/
$(document).ready(function() {
if ($(window).width() < 768) {
$('#menu-list').hide();
}
$('#direct-to-menu-list').on('click', function(e) {
e.preventDefault();
$('#menu-list').stop(true, true).slideToggle();
});
$(window).on('resize', function() {
if ($(window).width() >= 768) {
$('#menu-list').show();
}
});
});