henrygd / hide-show-scroll

enables / disables html scroll without content jumping around. 184 bytes.

Home Page:https://henrygd.me/hide-show-scroll

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hide-show-scroll npm File Size

https://henrygd.me/hide-show-scroll

This won't work if the scrollbar is on an element other than html. May add that option in the future.

Module Usage

$ npm install hide-show-scroll
import { hideScroll, showScroll } from 'hide-show-scroll'

// lock scroll / hide html scrollbar
hideScroll()

// allow scroll / show html scrollbar
showScroll()

Direct Script Usage

<script src="hide-show-scroll.min.js"></script>
// lock scroll / hide html scrollbar
hideShowScroll.hideScroll()

// allow scroll / show html scrollbar
hideShowScroll.showScroll()

License

MIT

About

enables / disables html scroll without content jumping around. 184 bytes.

https://henrygd.me/hide-show-scroll

License:MIT License


Languages

Language:JavaScript 100.0%