View Full Version : All Levels Navigation Menu sidebar iPhone problem

04-10-2009, 11:05 PM
1) Script Title: All Levels Navigational Menu

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/ddlevelsmenu/index.htm

3) Describe problem: I've built a sidebar menu that looks great across browsers. But when viewed on an iPhone or the iPhone emulator (http://iphonetester.com/) , the submenus flyout to the left (off screen) instead of the right as they are set to do in browsers. In addition, you can't choose one of the subitems - it disappears because there's a margin between the sidebar and the sub. How can this be fixed?
Much thanks.

04-10-2009, 11:17 PM
P.S. I was playing with the iphone tester and figured out it must be the width of the submenus - they're too wide to flyout to the right - BUT, if I scroll to move my main menu slightly left, it makes room for the subs to flyout. The same is true if I rotate the phone - makes more horizontal width for the flyouts. This is the same sort of thing that happens if a browser window is too small, if there's not enough width for them to flyout to the right. So, maybe there is no "problem" here - but it's good to know in case people complain. I'm still open to comments. Thanks.

04-11-2009, 06:58 AM
Assuming your guess is correct, what happens if you comment out the below line inside the .js file (// in red):

if (submenurightedge-scrollX>ddlevelsmenu.docwidth){
//menuleft+= -this._dimensions.submenuw + (this._istoplevel && dir=="topbar" ? this._dimensions.w : -this._dimensions.w)

This should stop the script from dropping sub menus to the left of the main menu when there isn't enough room to the right to accommodate the former.