
Product
Introducing Supply Chain Attack Campaigns Tracking in the Socket Dashboard
Campaign-level threat intelligence in Socket now shows when active supply chain attacks affect your repositories and packages.
上拉加载更多
组件只判断是否加载更多, 业务逻辑由使用者编写
如果body高度小于可视区高度时,会重复调用pullload,使用者不需要关心回调数据过少的情况

npm install pullload --save-dev
//支持amd,cmd,umd等方式调用
import { pullload } from 'pullload'
const { pullload } = require('pullload')
new pullload({
//onScrollEnd 为 加载更多时的回调
onScrollEnd : function(pullload){
}
})
| Name | Default | Description |
|---|---|---|
| distance | 30 | 加载下一屏的判定条件(距离页面底部距离),单位px |
| Method | Description |
|---|---|
| stop | 停止 |
| start | 启动 |
| tick | 业务逻辑执行完毕 |
var page = 1;
new pullload({
onScrollEnd : function(pullload){
$.ajax({
url: 'http://cmnt.sina.cn/aj/v2/index?page=' + page++,
success: function(rs) {
if(rs.data.length == 0){
pullload.stop();
}
var str = '';
rs.data.forEach(function(item, index) {
str += '<div></div>';
})
$('body').append(str);
//当dom操作执行完毕后, 需要运行该方法, 以允许下一次判断
pullload.tick();
}
})
}
})
FAQs
The npm package pullload receives a total of 0 weekly downloads. As such, pullload popularity was classified as not popular.
We found that pullload 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.

Product
Campaign-level threat intelligence in Socket now shows when active supply chain attacks affect your repositories and packages.

Research
Malicious PyPI package sympy-dev targets SymPy users, a Python symbolic math library with 85 million monthly downloads.

Security News
Node.js 25.4.0 makes require(esm) stable, formalizing CommonJS and ESM compatibility across supported Node versions.