Toggle with HTML and CSS |
Toggle with HTML and CSS |
Frits van Leeuwen |
Feb 24 2023, 06:19 PM
Post
#1
|
Group: Members Posts: 1 Joined: 24-February 23 Member No.: 28,820 |
Hello all,
I want to place an HTML code, probably in combination with CSS. I want to show an index. When the site visitor clicks on a line of the index, I want to insert the corresponding text under the clicked line. Then the text is gone by default, and it only appears when necessary. I can't use INPUT and Javascript doesn't work either. Who oh who will help me out. Yours sincerely, Frits van Leeuwen |
Christian J |
Feb 24 2023, 07:01 PM
Post
#2
|
. Group: WDG Moderators Posts: 9,661 Joined: 10-August 06 Member No.: 7 |
I recently learned about the DETAILS element, would that for you?
https://developer.mozilla.org/en-US/docs/We...Element/details |
pandy |
Feb 24 2023, 07:14 PM
Post
#3
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,733 Joined: 9-August 06 Member No.: 6 |
What happened with HTML for structure, CSS for presentation and JS for functionality, I wonder? 😏
|
Christian J |
Feb 25 2023, 06:58 AM
Post
#4
|
. Group: WDG Moderators Posts: 9,661 Joined: 10-August 06 Member No.: 7 |
I suppose it's only website creators that must follow those guidelines, not the spec writers. In fact the DETAILS element is not that different from say SELECT menus, and may save you a lot of code.
|
pandy |
Feb 25 2023, 09:35 AM
Post
#5
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,733 Joined: 9-August 06 Member No.: 6 |
True. But CSS is already doing stuff we though would thought would be a job for JS. I find the purpose behind it all a little confusing.
|
Lo-Fi Version | Time is now: 27th April 2024 - 01:04 PM |