开发者

Prevent scrolling in Browser without overflow hidden

I have scrollable content in a popup on a page. If the bottom of the content in that popup is reached via scrolling, the scroll of the body should not happen, it should be locked, as long as the focus is in the popup.

I could just apply an temorary overflow:hidden to the bod开发者_如何学编程y, but that would hide the main scrollbar of the body completely and make the page "shift", which I dont like to happen.

You can see what I mean in this testcase: http://jsfiddle.net/wVPDU/

Any ideas to fix this issue with may well with javascript/jQuery?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜