js 监听容器下拉滚动事件
获取数据的自定义方法,放在init回调或者scrollEnd回调里面触发
demo:https://cgygd.github.io/scroll-loading/index.html
- element - 绑定的容器
- type: String('body' || '#id' || '.class')
- required : true
- triggerDistance - 距离底部多少像素开始触发
- type: Number
- required : false
- default : 0
- init - 初始化成功触发事件
- type: function
- scrollEnd - 每次滚动成功触发事件
- type: function