Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1436656

    Sorry other thread closed and I cannot reply.
    @ Guenni007 . Script is not targeting the first_thumb but other image further down the gallery . If I change Content Element column count it will open a different thumb, but will be the same ones each time (not random).
    Would you mind checking this please? Perhaps we could use the data-onclick=1 element or adjusting code to use First_thumb?

      $('.link_to_lightbox a').addClass('no-scroll');
        $(document).on('click', '.link_to_lightbox a', function(event) { 
            event.preventDefault();
            var linkTarget = $(this).attr('href');
            $(linkTarget).find("a.first_thumb").click();
        });
    #1436658

    please show me your page. If you can not make it public – you had to wait for a mod.

    #1436659

    Actually I think I have resolved this now. It seems the column count affects the output code by adding a “first_thumb” class to more than 1 thumbnail, so ive adjusted code to target the first thumbnail only now.

    Thank you for the quick response.

    #1436700

    Hi,

    Glad to know that this has been resolved! Thanks to @Guenni007. Let us know if you have more questions.

    Have a nice day.

    Best regards,
    Ismael

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Open a Gallery (lightbox) from a button or hyperlink’ is closed to new replies.