I have searched through other inquiries on this platform, but none seem to address what I am specifically looking for. I am willing to utilize scripting languages like JavaScript or jQuery if necessary.
Query: I have a webpage containing a link that directs users to an FAQ page. When this link is clicked, I desire the user to be taken to the new page and automatically scrolled down to a designated element (one of the drop-down questions) while also triggering it to open as if clicked manually. Is such functionality achievable?
The link on the initial page appears as follows:
<a tabindex="0" href="https://somethinghere.com#q5-section" target="_blank" rel="noopener">.......</a>
I have already included the anchor tag at the end, however, it does not appear to be functioning correctly. (Should the link opening in a new tab versus the same window make a difference? It currently opens a new tab.)
The ID of the specific drop-down that should open on the new page when clicking that link is #q5-section
This is the HTML code encompassing the entire FAQ drop-down:
<div class="faq-question" id="q5-section">
<input id="q5" type="checkbox" class="panel">
<div class="plus">+</div>
<label for="q5" class="panel-title">................</label>
<div class="panel-content">
<span>
....................»
<ul>
<li>.........................</li>
<li>..........................</li>
</ul>
<br><br>
.......................»
<ul>
<li>...................</li>
</ul>
</span>
</div>
</div>
If any additional information is required to achieve this task, please inform me accordingly.