How does the mobile monitor the distance the page rolls away?

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?!

Mar.17,2021

then why did you stop it yourself? no, no, no.


has the landlord solved it?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3cffd-34726.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3cffd-34726.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?