stop scrolling of webpage with jquery

后端 未结 2 1301
无人及你
无人及你 2021-01-15 19:47

I am using a query bumpbox plugin with the webpage, I am working on but I can still scroll away from the bumpbox when I am using it. I was wondering if there was some sort o

2条回答
  •  南笙
    南笙 (楼主)
    2021-01-15 20:06

    It's hard to be specific with no code posted, but to prevent scrolling you could do something like :

    $(window)​​.on('scroll', function() {
        $(this).scrollTop(100); //sets the scrollposition to 100px
    })​​;​
    

    FIDDLE

提交回复
热议问题