artberri / sidr

Sidr is a jQuery plugin for creating side menus and the easiest way for doing your menu responsive.
http://www.berriart.com/sidr/
MIT License
2.89k stars 595 forks source link

How to close the sidebar as well as open the content in the webpage using sidr plugin? #326

Closed srigiriharish closed 6 years ago

srigiriharish commented 7 years ago

By using the sidr plugin I have created a sidebar and I also created a button with which I can toggle the sidebar.

Now once I click the toggle button the sidebar opens and if I click on any options the content in the page changes which is done using angular js routing concept. Now once I click on any option the content should change and the sidebar should also be closed.

To implement this I have applied sidr plugin's close method on the options.

$('#secondOption').sidr(['close'])

Now after adding the above code once I click on the option, the sidr is getting closed as expected but the content in my page is not getting changed.

How should I close the sidebar and also change the content on my page at the same time by clicking on any option.

artberri commented 6 years ago

Stackoverflow is a better place for doubts and implementation issues (don't forget to provide your failing code).

srigiriharish commented 6 years ago

Thanks, Got the answer in stack overflow :)