1.0.1 • Published 4 years ago

prevent-top-pull-down v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

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