Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
light-scroll
Advanced tools
一款轻量级的h5滚动插件,将自己平时项目里写的代码整合而来的,后续会逐渐支持更多功能。
npm install light-scroll
js里引用
import LScroll from 'light-scroll'
/**
* 实例化
* @param {String|DOM} el - 容器的DOM或者是样式‘.xxx’
* @param {Object} options - 配置项
*/
var scroll = new LScroll(el, { ... })
session
- 表示是否开启浏览定位缓存功能
pullUpLoad
default: false
- 表示是否开启上拉加载更多
pullDownRefresh
default: false
- 表示是否开启下拉刷新
// 触发加载更多事件监听
scroll.on('loadMore', function() {})
// 触发刷新事件监听
scroll.on('refresh', function() {})
// 拖拽出现下拉刷新时的touch事件
scroll.on('touchMove', function() {}))
FAQs
We found that light-scroll demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.