Try this: http://www.puresimstudios.com/ibbdemo/
I've actually found this to be incorrect for IE 8:
var MenuBar = new Spry.Widget.MenuBar2("#MenuBar", {
widgetClass: "MenuBar MenuBarLeftShrink",
});
Use
var MenuBar = new Spry.Widget.MenuBar2("#MenuBar", {
widgetID: "MenuBar",
widgetClass: "MenuBar MenuBarLeftShrink",
insertMenuBarBreak: true,
});
Also, what did not work was:
var MenuBar = new Spry.Widget.MenuBar2("#MenuBar", {
widgetClass: "MenuBar MenuBarRightShrink"
});
I did find that what I started with on the .htm page was:
var MenuBar = new Spry.Widget.MenuBar2("#MenuBar", {
widgetID: "MenuBar",
widgetClass: "MenuBar MenuBarRightShrink",
insertMenuBarBreak: false,
mainMenuShowDelay: 100,
mainMenuHideDelay: 200,
subMenuShowDelay: 100,
subMenuHideDelay: 200
});
That code works great for all browsers; however, as noted elsewhere in this thread, it completely drops the ball on my iPad2. I spent two horrible days working through this using all the examples linked and none of them worked for me. I finally ended up with:
var MenuBar = new Spry.Widget.MenuBar2("#MenuBar", {
widgetID: "MenuBar",
widgetClass: "MenuBar" });
This works flawlessly [for me] in IE 8 & 9 along with FireFox 5.0 (PC), Chrome 12 (PC), Safari 5.0.5 (PC), Opera 11.50 (PC) and more importantly, it works on my iPad 2 running 4.3.3. Yes, the drop down menus work with a single tap to pulldown from the main bar as well as closing the drop down with a single tap. I have not tested in earlier versions of IE but I figure it probably works in 7 and probably won't in IE 6 but I'm not really supporting anything less than IE 8.
I used the Spry 2.0 widget to generate the menu bar. I thought I was going to have to call it quits and let iPad users double-tap but I'm persistent. Obviously your mileage may vary, but this is what worked for me.
EDIT: It's critical for full compatibility with IE 8 that your page has the following at the very top of the source code. I've added the bold to the part of the code to show you what you're probably missing. The Spry 2.0 widget did not generate that by default. Without it, the dropdowns in IE 8 will behave erraticaly--menu options won't show the highlight on hover unless you mouse over the text; menus will collapse by themselves unless you keep your mouse on text.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
Message was edited by: STLRon
As a couple of people mentioned, we have a workaround, but not a solution - and I wonder if anybody has a solution before I uninstall UI MenuBar2 from my site (not huge, but 1m+ pages a month). What we have is simply unacceptable in the mobile world - and 20% of my traffic is mobile, and growing.
Workaround: drop down menus do work with mobile safari, IF the top level is a null link (a hash).
However, my issue is that you cannot have an active link in the top level. This is a significant weakness, and poses problems for many people. For example, my top level sends you to a landing page, with links to the level 2 pages (as well as other information). I need mobile users to be able to see the full drop-down menu, and be able to click on the top-level link. I don't want to lose that top level landing p[age (and I don't want to list it twice)
What we have in UI2 is a good new product in terms of styling, but a few years out of date in terms of usage.
I have seen many other sites which deal with this better than UI Menu2. The most basic ones require one tap to activate the menu, two to activate a link (changing onmouseover/hover to onclick?). Smarter menus detect the browsers, and toggle the behaviour (mouseover/click) automatically.
Probably a straightforward hack to change things myself, but I am getting lost in the new spry java libraries.
So - anybody got a suggestion for getting top-level and drop-down links working?
I have found that the latest SPRY menus work OK if you use the Widget Browser to create them.
However, I have since dropped SPRY and now use jQuery/Superfish for my menus. This provides an excellent alternative.
Check out Superfish: http://users.tpg.com.au/j_birch/plugins/superfish/
This works on iOS devices and I have moved many of my existing sites to that solution.
Hope this helps.
I just wanted to add another solution to the overall iPad dropdown menu issue.
After evaluating the verious frameworks ( Spry 2.0 Menu Bar, superfish etc) which are way too heavy weight in my opinion, I came to the conclusion that pure CSS based dropdown menus work perfectly fine.
Refer to the excellent tutorial at http://www.htmldog.com/articles/suckerfish/dropdowns/ on how to create a CSS based drop down menu.
For an example of a multilevel (3) drop down menu that has been created by using the mentioned method see http://lg-ca.com/.
The menu works on IE6, 7, 8, 9, Firefox, Opera, Chrome, iPad, iPhone, Safari, just to name a few...
Cheers,
Marcel Manzardo | President & CEO
MMDesign Business Solutions
phone: 888 885-0205 | fax: 888 422-0186
Thanks DV_is_fun! That solved it! I was having the same fustration as you. The menus were not working properly on iOS devices but fine on all modern browsers. I downloaded the Spry 2.0 widget and created the menu but still there were issues until your fix which addressed the (clicking twice) problem. Appreciate the post!
I'm very much a novice when using Dreamweaver ... no formal classes and I feel as if I bumble through things.
With that said ... last summer I created a Spry Menu Bar that does not work with iPads ... I need to know if I totally need to start over with the downloaded widget or if there is a way I can convert my current spry menu bar ... please tell me in very simple terms ...
Thank you!
DFedder -
Yes, you need to completely redo your menubar.
1. Completely delete your old menubar, including all of the dependant javascript and css files.
2. Download the Widget Browser. http://labs.adobe.com/technologies/widgetbrowser/
3. Use the SpryMenuBar 2.0 widget.
Like DFedder, I created a menu bar with spry in CS4, I have upgraded to CS5.5 and after reading all the advice here about how to get our nav bar drop downs to work in IPAD and IPhone environments, I came all the way to these last two posts. So, I created a duplicate page of my home page, took out the old spry menu bar (and I am pretty sure the old code and dependent files), downloaded the spry 2.0 widget, watched videos and read the tutorials, then created the new drop down. Love the way it is supposed to work--but I am obviously missing something or have something left over because I get an error that says SpryMenu.js requires SpryWidget.js! you hit "ok" and it comes up with SpryMenuBarKeyNaviationPlugin.js requires Sprymenu.js! Hit okay a couple more times then the page comes up with the page displaying the list instead of the nav bar.
http://www.droznik.com/tenner_site/index2spry.html
I've tried redoing it from scratch and keep having the same problem. I'm sure it is much easier if you are starting with a brand new page, but I was hoping to fix the existing pages. They work in everything except ipad and iphone. Would love to make this work.
Any ideas appreciated.
In uploading SpryWidget.js it has become corrupted.
Instead of linking to the local file, link to the file housed by Adobe http://labs.adobe.com/technologies/spry/ui/includes/SpryWidget.js
Gramps
Ah my hero...so please forgive me for being a bit dense...but "how" do I link to it? Do I copy and paste it to a new file and replace my local file with it? Or is there a <a href = "http://labs.adobe.com/technologies/spry/ui/includes/SpryWidget.js"
I may be going a little crosseyed after looking at it all day, but I am not finding the line of code which actually does link to it...so I'm not sure where to put the link, or the path. Which sounds like a reason I am having the problem--maybe that line of code is missing?
Okay!! Soooo, progress IS being made...sort of! I copied the code from the page you linked for me, and pasted it into my sprywidget.js document, and now the navbar works in google and the other browsers. However, I am back to my original problem--the dropdown still doesn't show up on ipad and iphone.
Gramps, you are so good! Now if I can get the dropdown to work, I can really celebrate!
Change the highlighted line
<script type="text/javascript" src="engine1/jquery.js"></script>
<script src="sprymenu/includes/SpryDOMUtils.js" type="text/javascript"></script>
<script src="sprymenu/includes/SpryDOMEffects.js" type="text/javascript"></script>
<script src="sprymenu/includes/SpryWidget.js" type="text/javascript"></script>
<script src="sprymenu/includes/SpryMenu.js" type="text/javascript"></script>
<script src="sprymenu/includes/plugins/MenuBar2/SpryMenuBarKeyNavigationPlugin.js" type="text/javascript">
to
<script src="http://labs.adobe.com/technologies/spry/ui/includes/SpryWidget.js"type="text/javascript"></script>
Gramps
Thanks! I did the link...still have the problem on Ipad. the odd thing is, when we click on Portfolio (the one with submenus) it goes to the portfolio page...then when we hit the back button, it goes back to the index2spry.html page...and the drop down is visible! But you cannot get the drop down to occur with a single tap
I have the same problem for the so-called touchscreen friendly.
There're no "one tap to open sub menu, and second tap to open the link from parent menu"
my code from spry menu bar 2.0:
<link type='text/css' href='Spry-UI-1.7/css/Menu/basic/SpryMenuBasic.css' rel='stylesheet'/>
<script type='text/javascript' src='Spry-UI-1.7/includes/SpryDOMUtils.js'></script>
<script type='text/javascript' src='Spry-UI-1.7/includes/SpryDOMEffects.js'></script>
<script type='text/javascript' src='Spry-UI-1.7/includes/SpryWidget.js'></script>
<script type='text/javascript' src='Spry-UI-1.7/includes/SpryMenu.js'></script>
<script type='text/javascript' src='Spry-UI-1.7/includes/plugins/MenuBar2/SpryMenuBarKeyNavigationPl ugin.js'></script>
<script type='text/javascript' src='Spry-UI-1.7/includes/plugins/MenuBar2/SpryMenuBarIEWorkaroundsPl ugin.js'></script>
.....
<script type="text/javascript">
var MenuBar = new Spry.Widget.MenuBar2("#MenuBar", {
widgetID: "MenuBar",
widgetClass: "MenuBar MenuBarLeftShrink",
insertMenuBarBreak: true,
mainMenuShowDelay: 100,
mainMenuHideDelay: 200,
subMenuShowDelay: 200,
subMenuHideDelay: 200
});
</script>
thanks.
hi ojbravo,
thanks for your reply.
I tried your solution, but it seems still not working.
I've uploaded the sample page to http://saptodjojokartiko.com/tes
I put a link in parent menu: Sports.
if I clicked Sports then it'll go to the link which I put on Sports instead of dropping down its sub menu.
I'm using an HTC Desire and Galaxy tab.
Thanks
xmtn - I noticed you motified other parts of the javascript that initialized the menu bar. As many other things are dependant upon the id, I suggest changing the javascript to the default... Specifically, keeping the WidgetID and MenuBar variable as they are by default. As you can see here, I actually took out all of the Delays all together.
This is the script that is currently running and working properly on one of my sites:
// BeginOAWidget_Instance_2141544: #MenuBar
var MenuBar = new Spry.Widget.MenuBar2("#MenuBar", {
widgetID: "MenuBar",
widgetClass: "MenuBar MenuBarLeftShrink",
insertMenuBarBreak: true
});
// EndOAWidget_Instance_2141544
Here is your script:
var sapto_menu = new Spry.Widget.MenuBar2("#sapto_menu", {
widgetID: "sapto_menu",
widgetClass: "MenuBar sapto_menuRightShrink",
insertMenuBarBreak: true,
mainMenuShowDelay: 0,
mainMenuHideDelay: 0,
subMenuShowDelay: 0,
subMenuHideDelay: 0
});
North America
Europe, Middle East and Africa
Asia Pacific