我在实现水平滚动的 jquery 插件时遇到了麻烦。问题是,即使我遵循了每条指令,它也不会水平滚动。
这是演示: http ://www.designbyaturtle.co.uk/demos/horizontal-scrolling/
我的演示 http://jsbin.com/ezizoz/1
有人能帮我吗
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://www.designedbyaturtle.co.uk/demos/horizontal-scrolling/jquery.mousewheel.min.js"></script> <meta charset="utf-8" />
<script type = "text/javascript" src ="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script>
$(document).ready(function() {
$('html, body, *').mousewheel(function(e, delta) {
this.scrollLeft -= (delta * 40);
e.preventDefault();
});
});
</script>
</head>
<body>
dwdddddddddddddddddddddddddddddddddddd
dwdddddddddddddddddddddddddddddddddddddwdddddddddddddddddddddddddddddddddddddwdddddddddddddddddddddddddddddddddddddwdddddddddddddddddddddddddddddddddddddwdddddddddddddddddddddddddddddddddddddwdddddddddddddddddddddddddddddddddddddwdddddddddddddddddddddddddddddddddddddwdddddddddddddddddddddddddddddddddddddwdddddddddddddddddddddddddddddddddddd
</body>
</html>