Good day! The question is rhetorical. As we know, the background-attachment:fixed property in Internet Explorer does not work correctly, namely: when scrolling a page, the block that has this property jumps. This is provided that the block height is 100%. Is it possible to fool this browser with javascript? Thank!
|
1 answer
What can you say about this code? Tested in ie11, the issue is solved. Whether in all other versions - I do not know. Please comment. Thank!
if(navigator.userAgent.match(/Trident\/7\./)) { $('body').on("mousewheel", function () { event.preventDefault(); var wd = event.wheelDelta; var csp = window.pageYOffset; window.scrollTo(0, csp - wd); }); } |