artberri/sidr

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

Closed this issue · 2 comments

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.

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

Thanks, Got the answer in stack overflow :)