this is what I originally wrote:
document.body.addEventListener ("scroll",function (e) {
) if ($(this).scrollTop() > 50 ) {//
$(".total-prices").addClass("position-top")
}else{
$(".total-prices").removeClass("position-top")
}
})
but the mobile side of this is invalid, later Baidu said to use touchmove, but touchmove need to disable the default scrolling behavior, so the page can not be moved, so how to achieve?!