Sidebar nav from right side??


Topic: Sidebar nav from right side??

Gaurangi Sawant asked 8 years ago

I want to use Sidebar nav, by default its opening from left side, is there any class from which I can open that sidebar from right side? Or any Jquery modification required?

Marta Szymanska staff pro premium answered 8 years ago

Hello, In side-nav documentation: https://mdbootstrap.com/javascript/sidenav/ you have solution for your issue. Best, Marta

Kelly Garvy pro commented 6 years ago

i have this question and have read through all the documentation several times. I don't see where in the documentation I can changed which side the nav is on. I tried the edge: right in the javasript but that doesn't change anything. where exactly in the documentation does it outline how to change the side? what is the code if I want it to be on the right side of the screen?


Heath Huffman commented 6 years ago

Hi Kelly,

I agree with you, there is no documentation on this. However, I figured it out on my own by going through the properties myself. When you initialize the collapse button, add edge = right. Not sure why this did not work for you, but it did for me:

$('.button-collapse').sideNav({ edge: 'right'});


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: General Bootstrap questions
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags