stop scrolling of webpage with jquery

后端 未结 2 1300
无人及你
无人及你 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

    0 讨论(0)
  • 2021-01-15 20:14

    Easiest way to achieve this

    $("body").css("overflow", "hidden");
    
    0 讨论(0)
提交回复
热议问题