+ 21

[Solved] Sidebar Issue

https://code.sololearn.com/WZS96dVeh7ND/?ref=app When we click at the Community button at the bottom nav bar . At the Community tab , the Sidebar isn't working (only working in Home tab) . How to fix it ??👀

26th Oct 2020, 4:20 AM
Kartik
Kartik - avatar
5 Answers
+ 5
What I was trying to say is that there are two sidebars. One on Page1, the other on Page2. They both look the same, that's why I though that you copied from Page1 to Page2. But you are missing that there are two elements with id="mySidebar" in your code.
26th Oct 2020, 5:18 AM
Kevin ★
+ 11
Kevin ★ Thanks a lot 😄
26th Oct 2020, 8:44 AM
Kartik
Kartik - avatar
+ 9
Kevin ★ Yep , the Sidebar is taken from W3schools.com
26th Oct 2020, 5:04 AM
Kartik
Kartik - avatar
+ 6
I think you copy pasted a section of your code from one place to the other😅 That's not bad, it's good to save typing but remember that you can't have duplicate IDs in your code. There are many duplicated IDs there, change that and also modify the close and open functions at the bottom of the code to reflect those changes. Those functions simply won't work right now. I think it is a bad idea to have separate pages (with many things in common) and show/hide them using CSS. Once your code grows it's going to become slow and a bit hard to maintain. But that's just my opinion.
26th Oct 2020, 5:02 AM
Kevin ★
0
PoSiTiOn me problem hai
28th Oct 2020, 10:02 AM
Mask Man(What's in a name?)
Mask Man(What's in a name?) - avatar