I have a box that is 250px x 250px. I want to make it scrollable, but I don't want to have the scrollbars appear because of how much space they take up. I assume this is possible with jQuery, but not finding anything. Anyone know?
2 Answers
You can put what you want to scroll inside a another div, whose size is set. And make the css of this container to overflow: hidden; so there are no scroll bars. Then you can create some triggers (click on up/down arrows, etc.) that trigger a scrollTo on the container div.
Here's an example: http://jsfiddle.net/UwEe2/
2 Comments
ansarob
I will try that, thanks! Basically all I want is for them to be able to scroll it up and down only by hovering over the box and using the mouse or track pad to scroll.
trusktr
This doesn't seem to work on the root scrollable element (in some browsers it's the body element, in others the html element).
Found a nice script: jQuery slimScroll, solving your problem while looking awesome. (not my script)