Reputation: 49
I have a toggle button that show a side menu.
The side menu have a niceScroll.
I try hide niceScroll on hide menu event and that's working and I can see the cursor(niceScroll bar). Now on show menu event I try to show niceScroll and It's working but the cursor still hide.
I'm using this code for hide niceScroll at "hide menu event":
$("#sidebar").getNiceScroll().hide()
And this code to show niceScroll at "show menu event":
$("#sidebar").getNiceScroll().show()
any help please
Update
when I try to show it by clicking on menu, the css is:
left:-6px
I think it's a bug, didn't it ?
here is my code
Upvotes: 0
Views: 803
Reputation: 49
here is my solution based on this issue solution
I used remove
instead of hide
like this:
$("#sidebar").getNiceScroll().remove();
and I move the niceScroll initial from document.ready
to a function callNiceScroll()
and at the menu show event I call it with timeout:
setTimeout(callNiceScroll, 400);
and now it's working
Upvotes: 1