wieringen/tinyscrollbar — pull request #18 by djfarrelly (2014-04-01 17:44:07+00:00)
Title: Fix Firefox scrolling issue (w/ IE8 fix)

This PR is a follow up to #17 which addresses the Firefox on OSX scrolling issue (#16), but caused an issue in IE8 (as discovered by @wieringen). This also the `deltaY` variable to a more generic `delta` if it is being used to horizontal scrolling.

After looking further into it, #17 also created weird issues with horizontal scrolling in newer browsers, so I've added logic to also use `deltaX` if the user is scrolling horizontally (this works on a trackpad when scrolling horizontally or vertically). The ternary operators in `wheel()` are a little bit complex now, but I nested them to make it easier to follow. Let me know if you'd rather me abstract this into a function like `getDelta()` which takes the event as an argument.

I tested this in IE8 and it works just like it did originally! Thanks for that catch and let me know if there are any other issues here.