|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
-
- var menu_open = false;
- var site_pos = 0;
- var menu_pos = 0;
- function toggle_menu(){
- var menu = document.querySelector('#mobile-nav');
- var body = document.querySelector('body');
- var content = $('html,body');
-
-
- if (menu_open) {
- menu_open = false;
- menu.classList.toggle('open');
- body.classList.toggle('openmobilenav');
- $(content).scrollTop(site_pos);
- } else {
- menu_open = true;
- site_pos = $(content).scrollTop();
- $(content).scrollTop(0);
- menu.classList.toggle('open');
- body.classList.toggle('openmobilenav');
- }
-
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
|