I am currently working on an HTML project
<div class="ktmsg">
<ul>
<li class="a1">
<a title="Link Tools" href="#"> … </a>
</li>
<li class="a2">
<a title="Link Tools" href="#"> … </a>
</li>
<li class="a3">
<a title="Link Tools" href="#"> … </a>
</li>
</ul>
</div>
My goal is to insert a sub-menu after the second </li>
. The sub-menu will contain a link "<a href="#">More</a>
" and display the third list item when hovered over. The desired final output should appear as follows:
<div class="ktmsg">
<ul>
<li class="a1">
<a title="Link Tools" href="#"> … </a>
</li>
<li class="a2">
<a title="Link Tools" href="#"> … </a>
</li>
<ul> //Starting the sub-menu
<a href="#">More</a> // The link that after i hover it will start showing the <li> starting from the third one
<li class="a3">
<a title="Link Tools" href="#"> … </a>
</li>
</ul>
</ul>
</div>
I have tried writing some javascript code but I seem to be stuck. Any help or guidance would be greatly appreciated.