admin管理员组文章数量:1356734
Referencing to the following example:
/
It does work under Chrome, but does not under Firefox.
In Firefox you can scroll only using arrow keys but not mousewheel.
Somebody know why this happens?
Referencing to the following example:
http://css-tricks./snippets/jquery/horz-scroll-with-mouse-wheel/
It does work under Chrome, but does not under Firefox.
In Firefox you can scroll only using arrow keys but not mousewheel.
Somebody know why this happens?
Share Improve this question asked Aug 10, 2014 at 11:30 RafffRafff 1,5163 gold badges20 silver badges38 bronze badges2 Answers
Reset to default 4I made a fiddle where you have a working example of a horizontal mouse scroll.
http://jsfiddle/ata68xr6/
using jquery.mousewheel.js and jquery with the function:
$(function() {
$("html, body, *").mousewheel(function(event, delta) {
this.scrollLeft -= (delta * 80);
this.scrollRight -= (delta * 80);
event.preventDefault();
});
});
This was posted as a solution in the ments of the site you referenced:
$(function() {
$("html, body").mousewheel(function(event, delta) {
this.scrollLeft -= (delta * 30);
event.preventDefault();
});
});
本文标签: javascriptMousewheel horizontal scrollingStack Overflow
版权声明:本文标题:javascript - Mousewheel horizontal scrolling - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744065223a2584865.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论