# Lightbox not working on subsequent paginated pages after infinite load

**URL:** <https://forum.finsweet.com/t/lightbox-not-working-on-subsequent-paginated-pages-after-infinite-load/5489>\
**Category:** Attributes\
**Tags:** cmsfilter\
**Created:** [July 16, 2025, 9:33pm UTC](https://forum.finsweet.com/t/lightbox-not-working-on-subsequent-paginated-pages-after-infinite-load/5489 "2025-07-16T21:33:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Drcontempo](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/drcontempo/32/3433_2.png) [@Drcontempo](https://forum.finsweet.com/u/Drcontempo)\
**Post date:** [July 16, 2025, 9:33pm UTC](https://forum.finsweet.com/t/lightbox-not-working-on-subsequent-paginated-pages-after-infinite-load/5489/1 "2025-07-16T21:33:57Z")

</div>

I have a portfolio page on this [**site**](https://levitatemedia.com/portfolio) that uses infinite load and a lightbox, which works normally on the first paginated page. After I scroll down and the infinite load loads the next page, and the next, etc. the lightbox no longer works. Been at this for a few days, not sure what could be the culprit here.

In the [**staging site**](https://levitate-media.webflow.io/portfolio), if you click on a thumbnail, you can see all 21 lightbox items in the same gallery. After loading the next page, the lightbox gallery items doesn’t update with the additional items.

Any help is greatly appreciated, thank you!

[Live site](https://levitatemedia.com/portfolio)  
[Read-only](https://preview.webflow.com/preview/levitate-media?utm_medium=preview_link&utm_source=designer&utm_content=levitate-media&preview=3a34d514072d36a91cb4b68036e51502&workflow=preview)

---

<div class="post-metadata">

**Author:** ![Support-Pedro](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/support-pedro/32/6470_2.png) [@Support-Pedro](https://forum.finsweet.com/u/Support-Pedro)\
**Post date:** [July 17, 2025, 8:26am UTC](https://forum.finsweet.com/t/lightbox-not-working-on-subsequent-paginated-pages-after-infinite-load/5489/2 "2025-07-17T08:26:23Z")

</div>

Hi @Drcontempo!

I’ve made this script to listen for when List Load finishes rendering items, then it re-initializes Webflow’s lightbox component to ensure it works properly with the newly loaded content.

Add this script before your `</body>` tag.

```auto
<script>
  window.FinsweetAttributes ||= [];
  window.FinsweetAttributes.push([
    'list',
    (listInstances) => {
      listInstances.forEach((listInstance) => {
        listInstance.addHook('render', () => {
          const lightbox = window.Webflow?.require?.('lightbox');
          if (lightbox && typeof lightbox.ready === 'function') {
            lightbox.ready();
          }
        });
      });
    },
  ]);
</script>

```

Try this and please let me know if it works for you!

---

<div class="post-metadata">

**Author:** ![Drcontempo](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/drcontempo/32/3433_2.png) [@Drcontempo](https://forum.finsweet.com/u/Drcontempo)\
**Post date:** [July 18, 2025, 6:29pm UTC](https://forum.finsweet.com/t/lightbox-not-working-on-subsequent-paginated-pages-after-infinite-load/5489/3 "2025-07-18T18:29:38Z")

</div>

> [@Support-Pedro](#):
>
> ```auto
> <script>
> window.FinsweetAttributes ||= [];
> window.FinsweetAttributes.push([
> 'list',
> (listInstances) => {
> listInstances.forEach((listInstance) => {
> listInstance.addHook('render', () => {
> const lightbox = window.Webflow?.require?.('lightbox');
> if (lightbox && typeof lightbox.ready === 'function') {
> lightbox.ready();
> }
> });
> });
> },
> ]);
> </script>
> 
> ```

It did indeed!! Thank you!!!
