horizontal scrollbars with slimscroll
Asked Answered
O

5

6

I use slimscroll for my scrolling needs and it works great. Now I have need for horizontal scrolling. A quick google search gives me some results to references in the github source code and some issues which indicates that that horizontal scroll support has been added but nowhere I can I find an example. I've looked in the javascript file expecting to find a flag to switch from vertical to horizontal. Helas nothing so obvious. So my question is it possible if yes, how? An example would be greatly appreciated.

Ozonosphere answered 4/7, 2014 at 9:49 Comment(1)
can you consider using custom scrollbar -> manos.malihu.gr/tuts/jquery_custom_scrollbar.htmlReynolds
W
8

The latest version of slimscroll is 1.3.1 (from github repository) and it does not support horizontal scrollbar. Try jQuery Scrollbar or any scrollbar that supports horizontal scrolling from this scrollbar comparison table.

Wachter answered 4/7, 2014 at 10:22 Comment(2)
thanks for the comparison table. it's a great help!!Ardenia
Actually there is a fork of the jquery slimscroll plugin with horizontal support: github.com/lanre-ade/jQuery-slimScrollFerroelectric
M
1

Now you can atualize your plug-in on the SlimScroll git repository, and just use the code below to instance your slimScroll

$('#testDiv').slimscroll({
    height: 150,
    width: 300,
    axis: 'both'
});
Materialism answered 11/9, 2018 at 17:20 Comment(0)
H
0

Slimscroll with both axes examples using Bootstrap 4.

Click here to see the online working examples.

Heathendom answered 21/2, 2019 at 12:33 Comment(0)
C
-2

I implemented ngSlimscroll, the rewritten version of the original slimscroll in AngularJS. It also supports horizontal scrolling. See the demo for example.

Concinnate answered 16/6, 2015 at 6:11 Comment(4)
Thanks dude! I have posted a question for you on you on github.Ozonosphere
I've tried your module, but it broke my CSS. Can't be used without pain.Machination
This plugin is poorly built - you cannot scroll without highlighting the contents.Self
This works great! But one thing - when you resize the window nothing gets adjusted - you should have another option when resizing the window, adjust the scroll settings as well.. at least there should be a watch for height and width parameters. Can you add that?Fiedler
S
-2

Did you try adding this code?

$(".content").mCustomScrollbar({
    axis:"x" // horizontal scrollbar
});

$(".content").mCustomScrollbar({
    axis:"yx" // vertical and horizontal scrollbar
});
Selenaselenate answered 13/5, 2016 at 10:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.