Answer the question
In order to leave comments, you need to log in
Why is horizontal scrolling jerky on OSX in Safari?
Good afternoon! Faced such an interesting bug - horizontal scrolling twitches in safari. Here is the site where I need to do it: zaozyorina.ru
I did it through a script
<script type="text/javascript">
var wDelta = 100;
function scrollDoc(e) {
if (!e) e = event;
if (e.preventDefault) { e.preventDefault(); } else { e.returnValue = false; }
var __delta = e.wheelDelta || -e.detail;
__delta /= Math.abs(__delta);
document.documentElement.scrollLeft -= __delta * wDelta; // FF, Opera, IE
if (this.attachEvent) return false;
document.body.scrollLeft -= __delta * wDelta; // Chrome
}
window.onload = function() {
var html = document.documentElement;
if (html.attachEvent) {
html.attachEvent("onmousewheel", scrollDoc); // IE and Opera
} else {
html.addEventListener("DOMMouseScroll", scrollDoc, false); // FF
html.addEventListener("mousewheel", scrollDoc, false); // Chrome
}
}
</script>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question