I'm attempting to create a link that transforms into two separate links when the text is hovered over. An example of what I am trying to achieve can be seen here: . This website showcases how the 'collections' link splits into two distinct links for men and women upon hovering over it. So far, I have successfully created a link that separates into two words when hovered over, but not into two different links.
Below is my HTML code:
<li><a href="#" id="nav-item1"><span>Collection</span></a></li>
And here is my CSS code:
#nav-item1:hover span {
display:none;
}
#nav-item1:hover:before {
content: "Men Women";
}
While the text transformation works as intended, I am still unsure of how to convert the text into two separate links. I am uncertain if JavaScript is necessary for this task, as my proficiency in JS is limited.
Any suggestions?