PDA

View Full Version : Help With Drop Down Menu


betts02
03-14-2013, 04:47 PM
I have searched and found noting that suits what i need or want so here goes:

I have a simple drop down on my forums by the following:

Create plug in with process_template_complete and add global $template_hook;
$newTemplate = vB_Template::create('Events');
$template_hook['navtab_end'] .= $newTemplate->render();

Create template and add <li class="popupmenu">
<a href="javascript://" class="popupctrl navtab" style="background:transparent url({vb:stylevar imgdir_misc}/arrow.png) no-repeat {vb:stylevar right} center; padding-right: 15px">Events</a>
<ul class="popupbody popuphover">
<li><a style="text-indent: 0px; color:{vb:stylevar navbar_selected_popup_body_a_Color}" href="Link 1">Link 1</a></li>
<li><a style="text-indent: 0px; color:{vb:stylevar navbar_selected_popup_body_a_Color}" href="Link 2">Link 2</a></li>
</ul>
</li>

Additional.css template i also have

.navtabs ul.popupbody {
top: 21px;
}


This works fine for a single drop down menu and has been since i installed it

What i want to know is what code would i put for a double drop down menu ?

So that when i hover over say Link 1 it shows further menu items

Many thanks in advance

tbworld
03-14-2013, 07:57 PM
It is just another ul, li, list in html, but unfortunately you will have to create your own JavaScript to handle collapsing *accordion style" or hiding "cascading style". I handled it by rewriting vbulletin-core.js and then adding some simple support JavaScript to handle the collapsing and hiding.

Popupctrl does not natively support hover, but that is an easy fix, but you will want to add a mouse-over, mouse-out event/feature or it will be a lousy experience for the end user.

Take a look at a few menus over at directdrive.com. I can help you further when you have a more direct question. Good Luck!