Results 1 to 3 of 3

Thread: Drop Line Menu on iPad

  1. #1
    Join Date
    Jun 2011
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Drop Line Menu on iPad

    1) Script Title: jQuery Drop Line Menu

    2) Script URL (on DD): http://www.dynamicdrive.com/style/cs...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!

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    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:

    Code:
    			$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})
    DD Admin

  3. The Following User Says Thank You to ddadmin For This Useful Post:

    henk (06-16-2011)

  4. #3
    Join Date
    Jun 2011
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thanks!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •