Last active
November 26, 2019 10:36
-
-
Save edave64/d16df621900c86f3ab658c3adadc4a93 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
function handler (e) { | |
if (!e.currentTarget.classList.contains('vertical')) { | |
e.currentTarget.scrollBy({ top: 0, left: e.deltaY, behavior: 'auto' }) | |
} | |
} | |
a = document.querySelector('.panel') | |
a.addEventListener('wheel', (e) => { handler(e) }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment