Created
July 13, 2021 10:08
-
-
Save peterkarn/6c9c20f7883b77e1ac2d1db17c616020 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
const lockMarginValue = window.innerWidth - document.querySelector('.site-container').offsetWidth + 'px' | |
function pageMarginAdd() { | |
body.style.marginRight = lockMarginValue | |
// header.style.paddingRight = lockMarginValue | |
} | |
function pageMarginRemove() { | |
body.style.marginRight = '' | |
// header.style.paddingRight = '' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment