My ASP.net project includes a master page with navigation links. When I click on a link to load a different asp page, the navigation tab does not stay in the clicked color state; it reverts back to its original color. Since all pages are similar, using CSS won't work due to the page reloading each time. Is there a way to use JavaScript to instruct the page to display the hover color when loaded and maintain it? The challenge is that I can only modify HTML on the master page, making it difficult to implement changes. I have considered using nth-child but haven't been able to make it work. For reference, here is a basic example of my code:
<div>
<ul>
<li>One</li>
<li>Two</li>
<li>Three</li>
</ul>
</div>
How can I ensure that the 2nd link stays in its hover color upon page loading?