Title: [Plugin: Lightbox Plus] Infinite scroll issue
Last modified: August 20, 2016

---

# [Plugin: Lightbox Plus] Infinite scroll issue

 *  [ale152](https://wordpress.org/support/users/ale152/)
 * (@ale152)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-lightbox-plus-infinite-scroll-issue/)
 * Hi!
    I’m using this plugin with infinite scroll, which loads new images in a 
   page. How can I update images list in order to make lightbox plus work with these
   new images?
 * Thank you.
 * [http://wordpress.org/extend/plugins/lightbox-plus/](http://wordpress.org/extend/plugins/lightbox-plus/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [ale152](https://wordpress.org/support/users/ale152/)
 * (@ale152)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-lightbox-plus-infinite-scroll-issue/#post-3079481)
 * I found that if I call, from firebug console, this code:
    `$("a[rel*=lightbox]").
   colorbox({maxHeight:"100%",opacity:0.8,slideshow:true,slideshowAuto:false,slideshowSpeed:
   2500,slideshowStart:"start",slideshowStop:"stop"});` the lightbox list of images
   will update with the new images! The problem is that if I call this code from
   within the infinite scroll callback, it doesn’t work!
 * This is my infinite scroll callback:
 *     ```
       $('#sort').infinitescroll({
        /// ... ... ... ///
       },function( newElements ){
       var $newElems = $( newElements );
       $newElems.css('position', 'absolute');
       $newElems.css('margin', '10px');
       console.log($newElems);
       $('#sort').masonry( 'appended', $newElems, true );
       $("a[rel*=lightbox]").colorbox({maxHeight:"100%",opacity:0.8,slideshow:true,slideshowAuto:false,slideshowSpeed:2500,slideshowStart:"start",slideshowStop:"stop"});
       });
       ```
   
 * What am I doing wrong?

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: Lightbox Plus] Infinite scroll issue’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/lightbox-plus_fafafa.svg)
 * [Lightbox Plus Colorbox](https://wordpress.org/plugins/lightbox-plus/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/lightbox-plus/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/lightbox-plus/)
 * [Active Topics](https://wordpress.org/support/plugin/lightbox-plus/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/lightbox-plus/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/lightbox-plus/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [ale152](https://wordpress.org/support/users/ale152/)
 * Last activity: [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-lightbox-plus-infinite-scroll-issue/#post-3079481)
 * Status: not resolved