I used perfect-scroll but this plugin put Y and X scroll bars. How to disable x scroll?
I found this page but haven't codes ..
$(document).ready(function ($) {
$('.sidebar').perfectScrollbar({
useBothWheelAxes: false
})
});
To suppress the scroll bar in X axis simply set suppressScrollX to true as follows.
$(document).ready(function ($) {
$('.sidebar').perfectScrollbar({
useBothWheelAxes: false,
suppressScrollX: true
})
});
I have a similar issue with RTL layout.
I fixed horizontal scrolling of my sidebar by using css direction: ltr;
to perfect-scrollbar element (<div class="sidebar">
in my case) and then direction: rtl;
to inner elements (<div class="sidebar-body">
in may case).
<body class="rtl">
<div class="sidebar">
<div class="sidebar-body">
.......
</div>
</div>
</body>
.
.rtl {
direction: rtl;
text-align: right;
.sidebar {
direction: ltr; // This is the fix
.sidebar-body {
direction: rtl; // Then change to rlt back
}
}
}
I hope this will help you. sorry for my bad English :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With