Within my webpage, I have created a section with three links. Clicking on each link reveals specific content (content 1, content 2, and content 3). The issue arises when I have two identical sections (Section 1 and Section 2) and clicking on a link displays the content in both sections simultaneously.
I am seeking assistance either through JQuery or vanilla JavaScript to resolve this dilemma. My current implementation is not optimal, so any improvement suggestions are welcome. Below is the Codepen link for reference:
<a href="https://codepen.io/dan-zins/pen/mdammed">codepen</a>
Here are some screenshot references:
https://i.sstatic.net/XUOIH.png
https://i.sstatic.net/AtqWC.png
https://i.sstatic.net/rCABh.png
https://i.sstatic.net/CAA5m.png
I have explored various sites looking for a solution, including using data-id and $(this) in the onclick function, but haven't been successful in resolving my specific issue.