Tabs and button collapse conflict in web code | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Tabs and button collapse conflict in web code

help, i am still kinda understanding how to put together code, I merged a button collapse into a web page with tabs, seems the active attribuit is conflicting I dk how to fix it https://code.sololearn.com/WvF95cuRONA4/?ref=app

9th Aug 2020, 4:17 AM
Leonardo Monterey
Leonardo Monterey - avatar
12 Answers
10th Aug 2020, 11:10 AM
Gordon
Gordon - avatar
+ 3
While it is easy to write the corrected version for you; I think it is more beneficial to you (and the community) by teaching you how to debug your code. The error message of your current version says Uncaught TypeError: Cannot read property classList of null at line 30 Checking line 30 of your current version, you are trying to access classList of a "target". This target is assigned at line 16 of your current version. We debug with console log console.log(target); //null line 19 of my edit https://code.sololearn.com/WHN8yRq8gXwF/?ref=app Checking the query selector argument at your current line 16. tab.dataset.tabTarget this does not have a match in your HTML of your current version. see?
10th Aug 2020, 12:58 AM
Gordon
Gordon - avatar
+ 3
I'll film a YouTube video for you explaining 1. What's the problem with your current code. 2. How to correct your current code 3. What is the easiest way to code this feature 4. Why Web Dev Simplified is using this way. I'll film that when I have time later today and post the link here.
10th Aug 2020, 3:54 AM
Gordon
Gordon - avatar
+ 1
Hope this is what u looking for https://code.sololearn.com/W5WWgb3yYt0V/?ref=app
10th Aug 2020, 4:25 AM
Divya Mohan
Divya Mohan - avatar
0
Please clear which is button and tab . Also describe how you are expecting the result.
9th Aug 2020, 12:15 PM
Divya Mohan
Divya Mohan - avatar
0
on the content button I want it to drop down and display the content that should be hidden upon opening the page, the tabs are menue like buttons on top of the paage
9th Aug 2020, 4:15 PM
Leonardo Monterey
Leonardo Monterey - avatar
0
the one titled nave bar is not a nav bar its a title to the content beneath it, the components patterns and progrtams are the tabs of the page
9th Aug 2020, 4:18 PM
Leonardo Monterey
Leonardo Monterey - avatar
10th Aug 2020, 3:11 AM
Leonardo Monterey
Leonardo Monterey - avatar
0
In which tab you want to put those collapsible ?? In home! In pricing ! In about ! Few collapsible in all tabs.
10th Aug 2020, 3:26 AM
Divya Mohan
Divya Mohan - avatar
0
I want the tabs at the top to switch pages In each page, I want info like the button collapse code
10th Aug 2020, 3:44 AM
Leonardo Monterey
Leonardo Monterey - avatar
0
In the my favorite code i tried to do a combination https://code.sololearn.com/WvF95cuRONA4/?ref=app
10th Aug 2020, 3:45 AM
Leonardo Monterey
Leonardo Monterey - avatar
0
For each tab i want to inbed my favorite codes, and in the collapsible but list an explanation of why i like said code
10th Aug 2020, 3:46 AM
Leonardo Monterey
Leonardo Monterey - avatar