Skip to content

Closing the drawer element by clicking on sidebar item #3261

Closed Answered by saadeghi
schummd asked this question in Q&A
Discussion options

You must be logged in to vote

<a> tag opens a link but if you want to do a second behavior on top of that (closing the sidebar) you would need JS to do that.

Checking and unchecking the my-drawer-4 checkbox opens or closes the sidebar so you should use JS to uncheck that checkbox.

It's different for each framework but usually for JS frameworks, it's possible by binding a variable as the value of checkbox and then setting that variable to false when item is clicked.

Let me know if you have any questions.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by saadeghi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants