jquery weui scrolling loads multiple times
related codes
< div id= "refresh" >
<div id="listwrap" style="height:auto;overflow:auto;">
<div class="weui-pull-to-refresh__layer" style="padding:25px;">
<div class="down"></div>
<div class="up"></div>
<div class="refresh"></div>
</div>
<div *ngIf="!Carlist" class="nohavefee">
<img src="../../../assets/img/nofee.png" alt="" class="nosource-img">
</div>
<div class="weui-form-preview" id="Tolist">
</div>
<div class="weui-loadmore" *ngIf="loading" style="padding-bottom:30px;height:20px">
<i class="weui-loading"></i>
<span class="weui-loadmore__tips"></span>
</div>
<div class="nomore" *ngIf="undeterminedItems&&!loading&&!hasMore">
</div>
</div>
js Code
/ / Scroll load
$("-sharplistwrap").infinite().on("infinite", () => {
if (this.loading) return;
this.loading = true;
this.skip = this.Carlist.length;
setTimeout(() => {
this.getdata(2);
this.loading = false;
}, 2000); //
});
$(document.body).infinite().on("infinite", ()2angular4