I have the Spry Menu 2.0 pretty much dialed in how I want it. However, when the user taps the menu item from an iPad or iPhone for that matter, they have to tap the drop-down menu item twice for it to work. All the menu items work fine on the first tap except ones that have a drop-down. Is there a way to get the drop-down to pop up and work on the first tap from an iPad? Here is the code of that helps.
<ul id="MenuBarUpgradeAugust2012">
<li> <a href="default.html">Home</a></li>
<li><a href="apps4kids.html">About</a></li>
<li><a class="MenuBarItemSubmenu">Our Apps</a>
<ul>
<li> <a href="Rhyme-N-Time.html">Rhyme-N-Time</a></li>
<li> <a href="Free-The-Bee.html">Free The Bee</a></li>
<li> <a href="Trojan-Math.html">Trojan Math</a></li>
<li> <a href="Helping-Santa.html">Helping Santa</a></li>
</ul>
</li>
<li> <a href="smart-apps.html">Contact</a></li>
</ul>
Thanks,
Scott
I don't quite understand. Do they have to tap the dropped down items twice, or the menu item with the drop down twice?
Example for clarification:
Menu Item 1 - Menu Item 2 - Menu Item 3
sub 1
sub 2
So they tap Menu Item 2 or 3 once and it goes to the link. Are you talking about tapping twice on "Menu Item 1" or needing to tap twice on "sub 1" or "sub 2"
If they tapped on menu item 2 or 3 it goes directly to the link just like it is supposed too. However, when they tap menu item 1 once it doesn't do anything. If they then tap menu item 1 again, they get the drop down menu and can get to sub 1 and sub 2 just fine. Again, this only happens on the iPad/iPhone.
Spry menus use JavaScript mouseover and mouseout events to trigger submenus. These are the equivalent of hovering. You can't hover on a touch-screen device. A single tap activates a link if one's there. If there's no link, tapping twice activates the submenu.
The bottom line is that Spry menus weren't designed for touch-screen devices.
Hi David,
Actually, that sounds backwards (but it is Spry
In a mobile device,
if a root item is both a live link and a trigger for a sub-menu, the
first tap should reveal the sub-menu and a second tap should execute the
link. On a root item that is a null link and a sub-menu trigger, the
first tap reveals the sub-menu and a second tap closes the sub-menu. I
know one menu system for Dreamweaver that actually does that ![]()
--
Al Sparber - PVII
The Finest Dreamweaver Menus | Galleries | Widgets
Since 1998
Thanks for taking a look guys. I will give your method a shot Al, but not until my Huskers dominate poor Southern Miss. I am fully aware I could be jinxing Nebraska, but I'm crazy like that.
I can live with the way it is now but was hoping 1 tap could reveal the submenu.
Thanks again,
Scott
Al Sparber wrote:
Actually, that sounds backwards (but it is Spry
In a mobile device,
if a root item is both a live link and a trigger for a sub-menu, the
first tap should reveal the sub-menu and a second tap should execute the
link. On a root item that is a null link and a sub-menu trigger, the
first tap reveals the sub-menu and a second tap closes the sub-menu.
I haven't played around with Spry menus on touch-screen devices, but I did a lot of testing recently with the effect of hover on Android and iOS devices. What I found was that if a menu item has a direct link to a page, Android devices follow the link immediately without displaying any submenu. On iOS, tapping the link once displays a submenu if one exists. To follow the link, you have to tap twice.
The bottom line remains that drop-down/flyout menus designed for mouse-driven events need to be redesigned for touch screens.
Well, I have tried several variations of what you have suggested Al but I can’t seem to get the menu to drop down on the first click. My site is visited about 50% through PCs/Macs and 50% through mobile devices, so I certainly would prefer to have 1 click work for the drop-downs. I would think some kind of “onclick” event would do the trick, but I can’t seem to get it to work either.
If you are trying to fix the Spry menu, I think the amount of coding it would take would not be worth the effort. I would use a more modern menu system. The jQuery Superfish menu would work, I believe, as you want in mobile devices - or if you have a budget and want lots of features and lots of automation, I know our menu system would work. Here is a live example with real links on the menu so you can test on mobile:
http://www.projectseven.com/products/menusystems/pmm2/testing/mobile/i ndex.htm
Okay, I was able to find a work around from a post in the forum on a similar problem. Here is what they posted and it worked for me. I just hope this doesn't break anything else. ![]()
Change the top lines to the lines on the bottom.
I was able to figure it out the other night actually. I needed to change this:
var MenuBar = new Spry.Widget.MenuBar2("#MenuBar", {
widgetID: "MenuBar",
widgetClass: "MenuBar MenuBarRightShrink",
insertMenuBarBreak: false,
mainMenuShowDelay: 100,
mainMenuHideDelay: 200,
subMenuShowDelay: 100,
subMenuHideDelay: 200
});
To:
var MenuBar = new Spry.Widget.MenuBar2("#MenuBar", {
widgetClass: "MenuBar MenuBarRightShrink"
});
I hope this doesn't mess anything else up, but no issues to date.
North America
Europe, Middle East and Africa
Asia Pacific