prevent-top-pull-down
v1.0.1
Published
``` npm install prevent-top-pull-down ```
Downloads
1
Readme
install
npm install prevent-top-pull-down
use
// css
#wrap {
position: relative;
height: 500px;
border: 1px solid red;
// primary
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
}
#cont {
height: 2000px;
}
// html
<div id="wrap">
<div id="cont">
</div>
// js
const destroy = preventTopPullDown(document.getElementById('wrap));
// destroy if necessary
// destroy();
important
not compile by babel, support ECMA environment above es6