• Resolved norisknofun11

    (@norisknofun11)


    Hello!
    thanks for this fantastic plugin!

    I have a problem that I can’t solve:
    in my table, in the 4th column there are some thumbnails. To view the images in their original size, I click on the thumbnail.
    For the first 10 rows they will open with the lightbox, from the 11th they open on a new tab.
    If I change the default number of lines (eg 25) the first 25 open with the lightbox and the others in a new tab.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Essentially, you are caught by how your Lightbox solution (seems to be part of the the theme?) works together with images that are not yet on the page when it is initialized. From what I can see, that solution uses JavaScript code to attach the Lightbox feature to clicks on images. However, when using the pagination feature for a table, images from the second page on are only actually part of the page once that page is opened (this highly improves performance). To work with that, a JavaScript solution should employ a technique called “event delegation” (which essentially means to attach the feature to a click on the full page, and then check if the click happened on an image later on). (For a bit more technical explanation see https://datatables.net/faqs/index#events .)

    Unfortunately, the only real suggestion that I can make to get around this is to either contact your theme’s support team and ask them to maybe improve the Lightbox feature, or to instead use a dedicated Lightbox plugin that works better here.

    Regards,
    Tobias

    Thread Starter norisknofun11

    (@norisknofun11)

    thanks Tobias!
    I disabled the smartmag theme lightbox and used the elementor one which works better!

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this helped!

    Best wishes,
    Tobias
    ?
    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘only images on first page will open in the lightbox’ is closed to new replies.