PDA

View Full Version : Drop Line Menu on iPad



henk
06-14-2011, 07:56 AM
1) Script Title: jQuery Drop Line Menu

2) Script URL (on DD): http://www.dynamicdrive.com/style/csslibrary/item/jquery_drop_line_menu/P10/

3) Describe problem: the jQuery DropLine Menu script doesn't work on an iPad or iPhone. Is there a fix for this?
Thanks!

ddadmin
06-15-2011, 07:58 AM
Most of the issues with menus in iPhone/iPad have to do with the fact that these devices don't support a mouseover event, instead triggering the event handler originally intended for mouseover using onclick instead. The problem with that is that is the click event also triggers the browser into going to the destination page as well, overwriting any additional actions that was assigned to it. With that said, you can try disabling each anchor link's default behavior of visiting a URL when clicked on. Try adding the code in red to the below chunk of code inside the .js file:


$curobj.hover(
function(e){
var $targetul=$(this).children("ul:eq(0)")
if ($targetul.queue().length<=1) //if 1 or less queued animations
if (this.istopheader)
$targetul.css({left: $mainmenu.position().left, top: $mainmenu.position().top+this._dimensions.h})
if (document.all && !window.XMLHttpRequest) //detect IE6 or less, fix issue with overflow
$mainmenu.find('ul').css({overflow: (this.istopheader)? 'hidden' : 'visible'})
$targetul.dequeue().slideDown(droplinemenu.animateduration.over)
},
function(e){
var $targetul=$(this).children("ul:eq(0)")
$targetul.dequeue().slideUp(droplinemenu.animateduration.out)
}
) //end hover
$curobj.click(function(){return false})

henk
06-16-2011, 08:19 PM
Thanks!