View Full Version : Smooth menu hover
scentral1
04-10-2013, 03:26 PM
1) Script Title: Smooth Menu
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/ddsmoothmenu.htm
3) Describe problem:
Vertical Menu: The METHOD Hover feature does not work on Firefox or Google Chrome (latest versions).
It does work on IE. No matter which way I set it, you still have to click in order for it to show the sub menu when using Google Chrome or Firefox.
Any fix for this? It looks like this feature was just updated on Feb 25th, and I believe it used to work prior.
ddadmin
04-11-2013, 06:38 AM
Hmm I'm not seeing this issue. The default vertical version of the menu has its "reveal" option set to "toggle", which causes the sub menus to be revealed onclick:
ddsmoothmenu.init({
mainmenuid: "smoothmenu2", //Menu DIV id
orientation: 'v', //Horizontal or vertical menu: Set to "h" or "v"
classname: 'ddsmoothmenu-v', //class added to menu's outer DIV
method: 'toggle', // set to 'hover' (default) or 'toggle'
arrowswap: true, // enable rollover effect on menu arrow images?
//customtheme: ["#804000", "#482400"],
contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
})
If you remove this option, or set it to "hover", then at least for me, in FF and Chrome, the sub menus are revealed onMouseover.
scentral1
04-11-2013, 06:42 PM
Hmm I'm not seeing this issue. The default vertical version of the menu has its "reveal" option set to "toggle", which causes the sub menus to be revealed onclick:
ddsmoothmenu.init({
mainmenuid: "smoothmenu2", //Menu DIV id
orientation: 'v', //Horizontal or vertical menu: Set to "h" or "v"
classname: 'ddsmoothmenu-v', //class added to menu's outer DIV
method: 'toggle', // set to 'hover' (default) or 'toggle'
arrowswap: true, // enable rollover effect on menu arrow images?
//customtheme: ["#804000", "#482400"],
contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
})
If you remove this option, or set it to "hover", then at least for me, in FF and Chrome, the sub menus are revealed onMouseover.
Thanks for the response. Yes, I did remove the option. In my test, I found that on one of my XP computers with the latest Chrome and Firefox, it worked in hover mode just fine,
but on my Windows 7 computer and on my Windows 8 computer both with the latest versions of Chrome and Firefox it required a click and only works in toggle mode. It seems to work in IE on all computers.
I made a simple sample page with your default code to make sure it wasn't something else in my code:
http://www.srnow.net/menu/smoothsample.html
I removed the "method" line altogether on the sample page, but I also tried it with the line in there with 'hover' and it did the same thing.
Thanks for your help.
scentral1
04-16-2013, 08:23 PM
Any other thoughts on this. I have confirmed Firefox 20.0.1 has the issue on my windows 8 and Windows 7 computers, but works just fine on Vista and XP
Same with Chrome Version 26.0.1410.64 doesn't work in "hover" mode on Windows 8 or 7, but fine in XP and Vista... Odd.
IE works on all versions of Windows and IE 10 works as well. I really want to use this menu system for a major project. I remember it did use to work before
the special "METHOD" was added at the end of February, so I'm not sure why that made a difference.
ddadmin
04-17-2013, 06:45 PM
Sorry for the delay in response. I'm still not seeing this in my own tests, however. I've tried FF 20.01 and Chrome 26.0.1410.64 (both Win 7), The 2nd vertical drop down menu is revealed on hover.
The only possible explanation I see happening here is that your browsers are identifying themselves as touch enabled devices. The script when it encounters such a device automatically configures the "method" option to "toggle". That makes sense at least in the case of Windows 8. Assuming that's what's going on, one stop gap solution would be to also make sure the devices's screen width is below a certain width, say 768px, before allowing it to qualify as a touch enabled device by the script. To do this, find the below line inside the script:
var method = smoothmenu.detecttouch? 'toggle' : setting.method === 'toggle'? 'toggle' : 'hover';
and change that to:
var method = smoothmenu.detecttouch && screen.width<=768 ? 'toggle' : setting.method === 'toggle'? 'toggle' : 'hover';
Let me know if that does anything.
scentral1
04-20-2013, 12:03 PM
Yes that does it!! Yes, you are correct, my Windows 7 desktop computer and my Windows 8 desktop and laptop are all touch screens.
Thanks so much.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.