Closed (outdated)
Project:
Nice Menus
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 Mar 2010 at 00:37 UTC
Updated:
20 Oct 2025 at 09:06 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
xpatrolx commentedThanks Jerod!
I was running into the problem where a drop down menu on the right side of the Primary Links was pushed outside the browser window and not showing up. I'm running Drupal 6.15 and didn't know what to do with the code above. I shot Jerod an email and he was kind enough to help a little further.
By simply dropping this code into nice_menus.js the problem was solved. This worked in Firefox 3.6.3 and IE 7 & 8 with no issues.
Comment #2
Toxid commentedPerfect, thank you! Thanks to xpatrolx for sharing the information about where to put the code. This was a huge problem for me before.
Comment #3
Toxid commentedI had my menu aligned to the right so I always wanted the menu to always to the left side, regardless condition. I'm not good with javascript, so there's probably an easier way, but I changed the code at the if condition and got this:
So the code that told nice menues to open on the right side if there's enough space is gone, replaced by the code that tells it to open on the left side..
It does the trick for me. Then I change the css so that the arrow points left.
Comment #4
add1sun commentedThis needs to be supplied as a patch for proper review and a chance to get in.
Comment #5
danreb commentedI also need this on my last project and I think this is a nice feature for nice menu. I tried to create a patch using tortoiseCVS and I attached it here.
Comment #6
danreb commentedOh I also want to add that the js code added by jerodfritz also work fine in the following browser
Safari 5.0.2
Opera 10.51
Goggle Chrome 8.0.512
all tested in WinXP machine.
Comment #7
danreb commentedchanged status to needs review.
Comment #8
awasson commentedSubscribing and thanks Jerod for posting the fix. This has been one of those things that has been nagging at me for as long as I've been using Nice Menus (2-1/2 maybe 3 years). Other than that, they sure are handy : )
Since Jerod's addition hasn't made it into the module yet (and because hacking modules makes it hard to maintain) I decided the best way to apply it would be in a block. That way I could discard it if it gets resolved in a future update. Set your input format to PHP and add this block to some region in the page. drupal_add_js(); will put the JavaScript code in the head of the document so you don't need to worry about where you put your block as long as it is an active region.
Tested with Drupal 6.22 & Nice Menus 6.x-2.1
Thanks again Jerod!
Comment #9
chrispooh commentedGreat code, thank you!
For Drupal 7 update the nice_menus.js like this:
Comment #10
jaysonjaynes commented#9 worked great for me. Will this be rolled into a release, or a patch made? I hate hacking the module, but it does work.
Comment #11
avpadernoComment #12
astonvictor commentedD7 reached its EOL back in January 2025, and there is no active release for D7 for this module anymore.
Development or support is not planned for D7. All D7-related issues are marked as outdated in a bunch.