MyBB Community Forums

Full Version: drop down menu
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
to avoid closure of drop down menu, When clicking on one of the options, I use this code:

<script type="text/javascript">
		new PopupMenu( $('SOME_MENU_NAME'), $('SOME_MENU_NAME_popup'), { stopClose: true } );
	</script>

But it doesn't work!
Plz help me.
Nobody knows how to do this? Plz help
can we have test url of your popup menu
Sure,

Mybb's popup menu:
http://community.mybb.com/thread-105751-...#pid771109

Popup menu with requested feature:
http://www.talkaudio.co.uk/ipb/index.php...-motoring/
(Click on "Custom" then click on one of the options, Then you will see menu remains open)
Is it too hard to code sth like this???
This is the descriptive sample code chunk:

<!-- the link text button or image -->
<a href="somepage.php?action=default" id="some_unique_id">Click Here</a>

<!-- the menu items -->
<div id="some_unique_id_popup" class="popup_menu" style="display: none;">
    <div class="popup_item_container">
        <a href="firstmenulink.php" class="popup_item">First_dropdown_item</a>
    </div>
    <div class="popup_item_container">
        <a href="secondmenulink.php" class="popup_item">Second_dropdown_item</a>
    </div>
    <div class="popup_item_container">
        <a href="thirdmenulink.php" class="popup_item">Third_dropdown_item</a>
    </div>
    <div class="popup_item_container">
        <a href="fourthmenulink.php" class="popup_item">Fourth_dropdown_item</a>
    </div>
</div>

<!-- the action handler javascript -->
<script type="text/javascript">
// <!--
	if(use_xmlhttprequest == "1")
	{
		new PopupMenu("some_unique_id");
	}
// -->
</script>

Isn't it easy?
Thanks, but that didn't work, Could you give a test page for this code please?
It appears none of your tested java / jQuery codes working with your site and that puts me in doubt your site is suffering with conflict.

May I have the link to your site please?
Sorry, It works but not as I mentioned in post #1.
I know how to make a simple drop down menu, What I want is in post #1 & #4
Plz read them
Thanks