0

How do I create a drop down in the sidenav?

How do I create a drop-down that toggles between visible and invisible when clicked on a link the the sidenav menu? Thanks in advance https://code.sololearn.com/WQ383vPhQOMw/?ref=app

23rd Apr 2020, 10:33 AM
Evans
Evans - avatar
4 Answers
+ 1
1. Create a button on sidenav 2. Attach onClick listener to it. 3. Create a div , which contains your drop down content. 4. on that onClick listener, toggle div's class for display block or none. Resources: https://www.google.com/url?sa=t&source=web&rct=j&url=https://m.youtube.com/watch%3Fv%3Do0YiZF9XZL0&ved=2ahUKEwiU9YWW2v7oAhXIH7cAHURwBAMQt9IBMA56BAgLECQ&usg=AOvVaw3_5MgEQ7O7EkB1wFbBxJv6 https://www.w3schools.com/css/css_dropdowns.asp
23rd Apr 2020, 1:57 PM
Arvind Singh Rawat
Arvind Singh Rawat - avatar
0
Thanks but I want the drop down in the sidenav itself
23rd Apr 2020, 4:24 PM
Evans
Evans - avatar
0
Yeah put everything inside that sidenav div. You can also search for Accordion , you can get some inspiration from that.
24th Apr 2020, 1:43 PM
Arvind Singh Rawat
Arvind Singh Rawat - avatar
0
Thank you
24th Apr 2020, 4:12 PM
Evans
Evans - avatar