Vanilla JS Debouncing Header (hide on scrollDown and show on scrollUp)

HTML
1
<div class="o-header">Header</div>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
SCSS
1
2
html {
height: 200%; // just to enable
        scrolling
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
JAVASCRIPT
1
2
var oHeader = {};
(function() {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Expand for more options Login