Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1430814

    Hi Ismael,

    The topic was closed:

    But I have an issue when you are in the Lightbox there are a magnifying magnifying glass than when you click open the portfolio.
    Could you help me?
    Thanks advance,

    BR,

    Antonio

    #1431285

    Hey Antonio,

    Thank you for the inquiry.

    e Lightbox there are a magnifying magnifying glass t

    What do you mean by “magnifying glass”? Would you mind providing a screenshot of the issue? You can use platforms like Savvyify, Imgur or Dropbox to upload and share the screenshot. Here are the steps to follow:

    1.) Visit the website of your chosen platform, such as Savvyify, Imgur or Dropbox.
    2.) Locate the option to upload a file or an image.
    3.) Select the screenshot file from your computer or device and upload it to the platform.
    4.) After the upload is complete, you will be provided with a shareable link or an embed code.
    5.) Copy the link or code and include it in your message or response to provide us with the screenshot.

    Thank you for taking the time to share the screenshot. It will help us better understand the issue you’re facing and provide appropriate assistance.

    Best regards,
    Ismael

    #1431287

    Hi Ismael,

    I have explained very bad.
    The issue is when you click outside the image go to the gallery. (When you are outside the image the cursor change a magnifying glass)
    Thanks advance,

    BR

    Antonio.

    #1431346

    Hi,

    Thank you for the clarification.

    You can use this css code to revert the mouse pointer to default when closing the lightbox.

    .mfp-zoom-out-cur, .mfp-zoom-out-cur .mfp-image-holder .mfp-close {
        cursor: -moz-pointer;
        cursor: -webkit-pointer;
        cursor: pointer;
    }

    Best regards,
    Ismael

    #1431374

    Hi Ismael,

    Sorry again, my english is bad. Is not about change the cursor.
    The issue is that when you click out side the image (change the cursor to magnifying glass) in the light box go to:

    I would like go to

    like when you press the blade to close the Lightbox.
    Many thanks for tour effort to understand me.

    BR,

    Antonio

    #1431377

    Hi,

    Thank you for the clarification.

    To redirect the page again to the product page after closing the lightbox, please replace the script in the functions.php file with the following code.

    
    function ava_trigger_masonry_lightbox_on_load()
    { ?>
        <script>
        window.addEventListener('DOMContentLoaded', function() {
            (function($) {
                setTimeout(function () {
                    $('.av-masonry-container .av-masonry-item-with-image.lightbox-added:first').trigger('click');
                }, 100);
            }(jQuery));
        });
    
        (function($) {
            $(document).ready(function () {
                $('.av-masonry-entry').on('mfpOpen', function(e) {
                    $('.mfp-bg, .mfp-container').on('click', function(e) {
                        e.preventDefault();
                        var container = $(e.target)
                        if(container.hasClass('mfp-container')) window.history.back();
                    })
    
                    $('.mfp-close').on('click', function(e) {
                        e.preventDefault();
                        window.history.back();
                    })
                });
            });
        }(jQuery));
        </script>
        <?php
    }
    add_action( 'wp_footer', 'ava_trigger_masonry_lightbox_on_load', 99 );

    Best regards,
    Ismael

    #1431378

    Perfect Ismael!
    Many thanks!

    BR,

    Antonio.

    #1431548

    Hi,
    Glad Ismael could help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Open Lightbox directly’ is closed to new replies.