Skip to content

u/knellotron

In this archive from Jan 2009 to Aug 2022

5
posts
282
comments
1
media
9.2k
score

Top posts

Top comments

A few lines of javascript can redirect the direction of the scroll wheel, so scrolling down = scrolling right. I love this because it makes the difficulty of a horizontal design transparent - the user scrolls the wheel without thinking about it, and it just works as expected.

jQuery(function($) {
    $('div#container')
        .bind('mousewheel', function(event, delta) {
			var dir = delta > 0 ? 'Up' : 'Down';					
			if (dir=='Up'){ $.scrollTo('-=100px',{axis:'x'});}
			if (dir=='Down'){$.scrollTo('+=100px',{axis:'x'});} 
            return false;
    });

Requires jQuery and the ScrollTo plugin. I wrote this a few years ago, so there might be a tidier way now. I don't keep up with javascript very well.

66 points

Subreddits

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.