Iframe with black flicker pdf (blinks)

I have an iframe with pdf on my page and am trying to disable the scrolling of the main window when scrolling an iframe. Here is the code for it:

$('iframe') .mouseover(function () { var html = $('html'); html.data('previous-overflow', html.css('overflow')); html.css('overflow', 'hidden'); html.css('margin-right', '17px'); }) .mouseout(function () { // un-lock scroll position var html = $('html'); html.css('overflow', html.data('previous-overflow')); html.css('margin-right', '0px'); }); 

But such css changes cause the iframe content to flicker (using Chrome 13). How can I fix this blinking?

+4
source share
1 answer

If you want to work with all browsers and OS, the only way is to use special scrollbars, such as Tiny scrollbar, or you can take loot in this scroll list http://www.net-kit.com/jquery-custom-scrollbar- plugins .

0
source

Source: https://habr.com/ru/post/1369105/


All Articles