Scroll Horizontally Without Scrollbar Using jQuery

1 · Subin Siby · July 15, 2013, 3:30 a.m.
To scroll horizontally with CSS is very annoying, because the whole page will move vertically and sometimes the Y axis will scroll. So I decided to use jQuery and it’s very simple. Only 237 characters which is only 2 lines. Here is the jQuery code with the div id #scrollho. jQuery $('#scrollho').on('mousewheel',function(e){ e.preventDefault(); scrollLeft=$('#scrollho').scrollLeft(); if(e.originalEvent.wheelDeltaY.toString().slice(0,1)=='-'){ $('#scrollho').scrollLeft(scrollLeft+100); }else{ $('#...