I’m using the toggle element to create the FAQ for my site.
I need to be able to link to different questions using an url fragment such as https://mysite/faq/#question1
so we can refer users to a specific answer instead to the whole FAQ.
The thing is that if I put a
inside the toggle element, the url doesn’t get to the target fragment since it is in a display: none
element. And if I put the div
outside the toggle, the toggle group behaviour is broken (many toggles can be opened at the time).
I’m using a simple css rule to display the content :
div:target .toggle-content {
display: block;
}
Could you make it possible to set an id attribute for a toggle element?
Thanks in advance.