Close the nav sheet after click (needed for anchor links).
This commit is contained in:
parent
2e5cba8045
commit
9635284f60
2 changed files with 6 additions and 2 deletions
|
|
@ -35,7 +35,7 @@
|
|||
});
|
||||
|
||||
// Mark the form as submitted.
|
||||
$contact_button.on('click touchstart MSPointerDown', function () {
|
||||
$contact_button.click(function () {
|
||||
$contact_form.addClass('js-submitted');
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -22,11 +22,15 @@
|
|||
$('.main-menu').addClass('hidden').clone().removeClass('main-menu layout__navigation hidden').addClass('js-main-menu').appendTo('.mobile-nav-sheet').find('.navbar').removeClass('navbar').addClass('js-navbar');
|
||||
|
||||
// Toggle the mobile nav sheet.
|
||||
$('.mobile-nav-cover, .mobile-nav-toggle').on('click toushstart', function (e) {
|
||||
$('.mobile-nav-cover, .mobile-nav-toggle').click(function (e) {
|
||||
e.preventDefault();
|
||||
$('body').scrollTop(0).toggleClass('js-nav-open');
|
||||
});
|
||||
|
||||
// Close the nav sheet after click (needed for anchor links).
|
||||
$('.mobile-nav-sheet').find('a').click(function () {
|
||||
$('body').removeClass('js-nav-open');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue