I have successfully implemented the Flexible Slide-to-top Accordion on my webpage.
Initially, I struggled with the functionality to have only one accordion open at a time due to my limited knowledge of jQuery. However, after overcoming this challenge, I noticed that the slide-to-top feature was not functioning properly on iOS devices, particularly when there was a lot of content.
As a solution, I decided that if one accordion is open, the others should not collapse, resulting in a smoother animation.
However, a new issue arose when trying to close the accordion after scrolling down the page - I had to scroll all the way back up. I am seeking a more user-friendly solution that allows the accordion to be closed from anywhere within its content, without the need for an additional button.
My question is: How can I bind the closing function to any part of the accordion's content? If using a button is easier, I am open to that option, but I have envisioned a custom cursor feature that enables users to close the accordion anywhere they desire.
Apologies for the lengthy post, and thank you in advance for your help!