-
AuthorPosts
-
September 11, 2020 at 1:00 pm #1245120
Hi,
I hope you can help. I am trying to create a lightbox on the hotspot but there is a double lightbox effect. Do you know how I can disable one of them!?
Thanks so much :)
September 13, 2020 at 1:59 pm #1245506Hey amyteslin,
Sorry for the late reply and thanks for the link to your site. When your hot spots are clicked the built-in lightbox and the Lity lightbox are both opened. The Lity lightbox seems to be a part of the cq-hotspot plugin.
So one option would be to disable the built-in lightbox at: Enfold Theme Options > Lightbox Modal Window, if that doesn’t help because you need this lightbox elsewhere you can try this script that will disable the Lity lightbox on the one page on click.
Try adding this code to the end of your functions.php file in Appearance > Editor:function custom_script(){ ?> <script> (function($){ $(document).ready(function() { $("#top.page-id-5774 .hotspot-container a.cq-hotspot-tooltip").click(function() { setTimeout(function(){ $(".lity.lity-opened").css({ 'display': 'none' }); }, 300); }); }); })(jQuery); </script> <?php } add_action('wp_footer', 'custom_script');
Best regards,
MikeSeptember 14, 2020 at 10:03 pm #1245871Hi Mike, thanks so much for your help. It’s kind of worked in the way it’s now stopped the scrolling though images but it is still showing two lightboxes. Any ideas? Ideally I would prefer the second lightbox to be the one that stays as hopefully I will be able to add a caption to it. What do you think?
Thanks :)
September 15, 2020 at 12:10 pm #1246010Hi,
Please try removing the script and disable the built-in lightbox at: Enfold Theme Options > Lightbox Modal WindowBest regards,
MikeSeptember 16, 2020 at 12:04 pm #1246293Hi Mike,
That works perfectly for that specific page but now when looking at the image gallery on the bottom of this page, there isn’t a close button when the lightbox is activated.
September 16, 2020 at 1:28 pm #1246326Hi,
On the page that you linked to the gallery is not opening in a lightbox, the images are opening directly, if you notice the URL bar address ends with “/A0056334.jpeg” for example.
So now if we could get your new lightbox to work for these links it would be good.
Does your cq-hotspot plugin with the Lity lightbox have any instructions on integrating the new lightbox?
The Lity lightbox site says we should add the “data-lity” attribute to the links, but this doesn’t seem to work, perhaps the cq-hotspot plugin changed this? If you don’t see any tips in the documentation for the plugin try asking the plugin author.
Also please disable the smushit plugin for now.Best regards,
Mike -
AuthorPosts
- You must be logged in to reply to this topic.