WordPress.org

Ready to get started?Download WordPress

Forums

Easy FancyBox
[resolved] De-activate for mobile? (2 posts)

  1. jonmrich
    Member
    Posted 1 year ago #

    Hello.

    Saw this post (http://wordpress.org/support/topic/plugin-easy-fancybox-turn-off-fancybox-for-mobile?replies=10) and hoped it would work for me. But, it doesn't appear that the "easy_fancybox_handler" handler actually exists.

    I'd like to be able to disable fancybox for mobile devices, as the lightbox is way too big and causes other problems for YouTube videos on iPhones.

    Any updates would be helpful.

    Thanks

    http://wordpress.org/extend/plugins/easy-fancybox/

  2. RavanH
    Member
    Plugin Author

    Posted 1 year ago #

    Hi, you needed the development version... Which has just been released as 1.5.0 so from now on you can use:

    <script type="text/javascript">
    var pixelRatio = window.devicePixelRatio || 1;
    if(window.innerWidth < 500 || window.innerHeight < 500 || window.outerWidth < 500 || window.outerHeight < 500 ) {
      jQuery(document).off('ready gform_post_render', easy_fancybox_handler);
    };
    </script>

    Put it in a text widget or in your themes footer.php

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags