MyBB Community Forums

Full Version: Drop Down Menu Code?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm trying to get drop-down menus for my site and was testing this code to see if it would suffice. The issue is that instead of revealing the drop down menu when I click it, it goes to the link instead.

Here is an example of the code:

Quote:<div class="menu" class="wrapper">
<li><a href="{$mybb->settings['bburl']}/index.php" class="index"><i class="fa fa-align-left"></i> Forums</a></li>
<li><a href="{$mybb->settings['bburl']}/misc.php?action=help" class="help"><i class="fa fa-question-circle"></i> {$lang->toplinks_help}</a></li>
<li><a href="help.php" id="whatever_name">Main Link</a>
<div id="whatever_name_popup" class="popup_menu" style="display: none;">
<div class="popup_item_container">
<a href="index.php" class="popup_item">Just a Link</a>
<div class="popup_item_container">
<a href="portal.php" class="popup_item">Another Link</a>
<script type="text/javascript">
// <!--
if(use_xmlhttprequest == "1")
new PopupMenu("whatever_name");
// -->