I have a nested tree menu and at present, if I click on a parent node that has children it exposes the child nodes,
<ul id="menu" role="tree">
<li><a href="course/01_00_00_Getting Started.htm" target="ifrm">Getting Started</a>
<ul>
<li><a href="course/01_00_00_Questions.htm" target="ifrm">Questions</a></li>
<li><a href="course/01_01_00_Considerations.htm" target="ifrm">Considerations</a></li>
<li><a href="course/01_02_00_Changing Perspective.htm" target="ifrm">Changing Perspective</a></li>
</ul>
</li>
</ul>
BUT I also want the parent node to open an href, not just expose the child links.
Using the above example, when I click on the text ‘Getting Started’, I want the accompanying href to open the page (pages are opening in an iframe) AND expose the child links in the menu.
What do I need to do to incorporate this dual functionality? Or can someone please point to a functional example?
Thanks!
add the following two lines to the click handler on
livar anchor = ele.find('>a');
if(anchor.length > 0) {
a.click();
}
where ele is
$(evt.target)