7

I want to develop a webpage that moves towards the left direction whenever the user scrolls down the mousewheel. Generally all websites are vertical scrolling. But this one should scroll horizontally.

Example code:

<body>
<div style="width:10000px; height:400px; top:0; left:0;">
//here goes the content.
</div>
</body>

My objective is to scroll the DIV horizontally on mouse-wheel scroll, using jQuery or any other Javascript tool.

Boaz
  • 19,892
  • 8
  • 62
  • 70
Sujit Agarwal
  • 12,348
  • 11
  • 48
  • 79

1 Answers1

4

Horizontal page scrolling using Javascript

Daniel Little
  • 16,975
  • 12
  • 69
  • 93
  • 1
    The link still works, but the script it links to is no longer online. This is why SO encourages code snippets in the answer, so it doesn't go lost when external links go lost. – Herman Schaaf Dec 01 '12 at 13:08
  • In any case, you can access the original script through wayback machine: http://web.archive.org/web/20100927075638/http://paulicio.us/wp-content/uploads/2008/10/hscroll.js – Herman Schaaf Dec 01 '12 at 13:10