激活时,我的framework7刷新不触发'ptr:refresh'。当我按下鼠标时,UI会响应并显示箭头,但此操作似乎未触发javascript事件。
<div class="page-content ptr-content">
<div class="ptr-preloader">
<div class="preloader"></div>
<div class="ptr-arrow"></div>
</div>
<div class="list media-list">
<ul class="rounded">
</ul>
</div>
</div>
var ptr = app.ptr.get('.ptr-content');
ptr.on('ptr:refresh', function (e) {
console.log('This does not fire!');
});
答案 0 :(得分:0)
请尝试先获取元素
var ptr = $('.ptr-content');
然后添加事件监听器
ptr.on('ptr:refresh', function (e) {
console.log('This does not fire!');
});