One of the challenges I'm facing involves a fixed menu and content box (div) on a webpage. Whenever I click on the menu, the content box should scroll to a specific div.
Initially, everything was working fine.
Here is a sample of it in action: https://jsfiddle.net/ezrinn/8cdjsmb9/11/
The issue arises when I try to wrap the entire div setup into a show/hide toggle button - the scrolling functionality stops working.
Here is an example where the scrolling isn't functional: https://jsfiddle.net/ezrinn/8cdjsmb9/10/
Additionally, here is the code snippet:
[JavaScript and jQuery code snippet]
[CSS code snippet]
[HTML code snippet]
If you have any suggestions on how to fix this issue with the code, please provide your input. Thank you for your help.