Archived topic
How to add an accordion
17 replies · Started by Nikola on November 9, 2018
Awesome - do you mind me asking what the issue was? Others may find it helpful
Yes, of course. The problem with color was because the Unicode sign. I changed the Unicode sign (+ and -) with Toptal css code sign.
And for the "heading going over the :after element. I just added .accordion-toggle:after {margin-right: -40px;} and accordion-toggle {margin-right: 30px;} for the mobile version. That created the space betwen them and heading is not overlaping the :after element.
I found one more thing very useful, but i don't know how to create it.
When the toggle element is clicked i want to create a page jump to the active (clicked) toggle, at the beginning of the toggle. That is very useful if accordion has a lot of text inside. David, how to create that?
Thanks.
Regards,
Nikola
Thanks for sharing.
Combining the slideToggle and an animated scroll to top is a tricky bugger. I think you would need to ask that (or search) on StackOverflow.