Simply swap horizontal and vertical scrolling using mousepointer

Mckyknows

New Member
I am unsure of what code I am looking for here - I think probably javascript although I wonder if it could be achieved with CSSThe situation:I have a div (with a fixed width and height) - the content of this div exceeds both the width and height of its parent and there is therefore a scroll bar on the vertical and horizontal. The behaviours to effect:When I hold down my mouse on the vertical scrollbar and pull up or down, the content scrolls vertically. When I hold down my mouse on the horizontal scroll and move left or right the content scrolls horizontally. This is the default and expected behaviour I know, I am being precise so that my question is clear. The question:What I would like to do is a direct swap of these behaviours so: When I hold down my mouse on the vertical scrollbar and pull up or down, the content scrolls horizontally ANDWhen I hold down my mouse on the horizontal scroll and move left or rightI realise there are pretty obvious reasons why this is a bad idea but I need to be able to demonstrate this and don't seem to be able to find any examples. I'm not looking to make the page scroll horizontally when I roll my mouse vertically or anything like that that seems to come up often, I simply want to swap the behaviours of the vertical and horizontal scroll bars. I can post code if necessary but the situation is pretty generic I think, just a div with horizontal and vertical scrollbars.Any help would be much appreciated
 
Back
Top