Search code examples
jqueryipadfancybox

FancyBox: iPAD needs DoubleClick to Advance to Next Image


I have some galleries on http://rockcitybless.com which work perfectly in IE, Chrome and the desktop versions of Safari, Firefox and others.

But on iPad the first click (on the left or right side of the image) displays an arrow and only second click advances the image. I need the first click to advance to the next image.

I read a post talking about the same issue in Safari and the fix was to ensure that <a> tags were closed.

My <a> tags are closed (</a>) and have an unclosed <img> tag inside of it. The tags are generated via ajax calls (if that makes any difference).

FancyBox is otherwise PERFECT!


Solution

  • For mobile devices, you may want to try disabling the navigation arrows and use the button helpers instead. something like:

    $(".fancyLink").fancybox({
     arrows: false,
     closeBtn: false,
     helpers        : { 
      title : { type : 'inside' },
      buttons   : {}
     }
    }); 
    

    of course you need to load the fancybox-buttons js and css files