Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
15
rated 0 times [  19] [ 4]  / answers: 1 / hits: 15738  / 10 Years ago, tue, january 20, 2015, 12:00:00

So I have been trying for hours. Any tips or ideas on how to make a webpage scroll horizontal instead of scrolling down?



Edit: When someone scrolls vertically, instead of scrolling vertically you scroll Horizontally.


More From » html

 Answers
8

Here is what you need:



Example: http://css-tricks.com/examples/HorzScrolling/



Code: http://css-tricks.com/snippets/jquery/horz-scroll-with-mouse-wheel/



$(function() {
$(body).mousewheel(function(event, delta) {
this.scrollLeft -= (delta * 30);
event.preventDefault();
});
})

<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js?ver=1.3.2'></script>
<script type='text/javascript' src='/js/jquery.mousewheel.min.js'></script>


One More Example: http://jsfiddle.net/ye259/4/


[#68160] Friday, January 16, 2015, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
eliezerc

Total Points: 286
Total Questions: 102
Total Answers: 102

Location: Federated States of Micronesia
Member since Sun, May 16, 2021
3 Years ago
eliezerc questions
Mon, Jun 20, 22, 00:00, 2 Years ago
Fri, Sep 4, 20, 00:00, 4 Years ago
Fri, Jul 3, 20, 00:00, 4 Years ago
;