PDA

View Full Version : Adding Hover Menu Items


tcarter01
03-24-2012, 10:49 PM
I've inserted the following code in Hook Location location process_templates_completion. The menu appears but the submenu items don't appear until its clicked. Is there a way to change this so that the items appear as you hover over them without the click?

$template_hook['navtab_end'] .= '<li class="popupmenu">
<a href="javascript://" class="popupctrl navtab">Menu Test</a>
<ul class="popupbody popuphover">
<li><a href="sublink1.php">SubLink 1</a></li>
<li><a href="sublink2.php">SubLink 2</a></li>
<li><a href="sublink3.php">SubLink 3</a></li>
</ul></li>' ;

TIA,
Tony

kh99
03-25-2012, 10:38 AM
You can add class 'hovermenu' to your <li> tag, like:

$template_hook['navtab_end'] .= '<li class="popupmenu hovermenu">
...etc

tcarter01
03-25-2012, 03:05 PM
Thanks, that worked like a charm!

I just noticed that if I change the href to a valid page, it is not clickable. Is there another class I should use? Where can I find a reference docs for this?

$template_hook['navtab_end'] .= '<li class="popupmenu hovermenu">
<a href="menutest.php" class="popupctrl navtab">Menu Test</a>
<ul class="popupbody popuphover">
<li><a href="sublink1.php">SubLink 1</a></li>
<li><a href="sublink2.php">SubLink 2</a></li>
<li><a href="sublink3.php">SubLink 3</a></li>
</ul></li>' ;

Thanks,
Tony

kh99
03-25-2012, 03:36 PM
I don't think it works that way - it either opens a menu or it's a link.