Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Christine Rondeau

    (@crondeau)

    I think that the issue here had to do with Fancy box. It was making a div a link regardless of the code. I figured out a work around and it’s now working.

    Plugin Author Scott (@scottsweb)

    (@scottsweb)

    Excellent. I would be interested to see the code for the final solution if you get a few seconds.

    It is also worth noting that if you intend to cache your website this sometimes causes inconsistent behaviour. e.g. a cached mobile version may be shown to a desktop user – it all depends on how caching is setup.

    Will mark as resolved but let me know if there are more issues.

    Thread Starter Christine Rondeau

    (@crondeau)

    Thanks Scott,

    The first thing I did was set a conditional in my functions.php file like so:

    if(!is_handheld()) {
    		wp_enqueue_script( 'fancybox', get_template_directory_uri() . '/js/min/jquery.fancybox.js', false, '20140429', true );
    	}

    Then in my single-trip.php I made another conditional like so:

    <?php if( is_handheld() ) : ?>
    
    	<?php get_template_part( 'inc/slideshow-handheld' ); ?>
    
    <?php else : ?>
    
    	<?php get_template_part( 'inc/slideshow' ); ?>
    
    <?php endif; ?>

    I then duplicated the slideshow include which pulls the acf fields and then just made sure removed all the fancybox stuff from the handheld one. It’s probably a bit over the top, but, it works.

    I do agree with you though. I think that there was a caching issue on my iPad. I still have to figure out how to debug the ipad, so annoying…

    Plugin Author Scott (@scottsweb)

    (@scottsweb)

    Thanks for sharing, that all looks sane and sensible to me.

    You could try visiting http://demo.mobiledetect.net/ on your iPad to make sure the device is correctly identified. Mobble relies on this library to do device detection and it is not always perfect.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Conditional issue for iPad’ is closed to new replies.