Created
December 7, 2020 09:08
-
-
Save elliottmangham/f0815354507e45f3e52e1c03f2c6137e to your computer and use it in GitHub Desktop.
JS / Utilities / Force menu pop-up to be 100vh (to get around Chrome/iOS bar)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************** | |
* Force menu pop-up to be 100vh (to get around Chrome/iOS bar) | |
**************/ | |
$( window ).on( 'load', fnRealWindowHeight ); | |
$( window ).on( 'resize', fnRealWindowHeight ); | |
// Test....... | |
$( window ).on( 'load resize', fnRealWindowHeight ); | |
function fnRealWindowHeight() { | |
// Update window height | |
iWindowHeight = $( window ).height(); | |
// Apply height to navigation pop-up | |
oMobileMainMenu.css( 'height', iWindowHeight + 'px' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment