2

Just add: cursor: pointer to your <a> link a problem solved!


In the following code, a fancybox link is dynamically clicked to open up a fancybox gallery. This works fine in Chrome, Safari, Firefox etc. However on iOS, ipad, iphone, etc, it does not.

$(document).on('click', '.item .img-link', function(){
    var $me = $(this),
        myTargetRel = $me.data('target'),
        $myTarget = $('#item-images a[rel=' + myTargetRel + ']');

    $myTarget.click();
});

How do I get this working for iOS?

Thank you!

HandiworkNYC.com
  • 10,914
  • 25
  • 92
  • 154

1 Answers1

1

This is due to a known bug of iOS not responding to click events on <a> tags, check these links out:

jquery.click() not working in iOS

How to make my 'click' function work with iOS

Community
  • 1
  • 1
GEMI
  • 2,239
  • 3
  • 20
  • 28