WordPress.org

Ready to get started?Download WordPress

Forums

WordPress NextGen GalleryView
Using Nextgen Gallery View with Jetpack Infinite Scroll (3 posts)

  1. ngoodfellow
    Member
    Posted 1 year ago #

    I am trying to use the NextGen Gallery View plugin with Jetpack Infinite Scroll

    http://jetpack.me/support/infinite-scroll/

    I can't seem to get it to work

    The page says:

    JavaScript Events

    Inevitably, there are situations in a theme that require some JavaScript interaction after posts are added. One such example is in a theme that uses jQuery Masonry and needs to trigger that library to position the additional posts. Recognizing this need, we trigger an event after posts are appended. To make use of this event, simply catch the post-load event when it fires on document.body.

    I am just not sure how to use this for GalleryView

    I tried:

    <script type="text/javascript">
    // Trigger GalleryView for each Infinite Scroll post load
    if ( 'function' === typeof( jQuery ) ) {
    jQuery( document.body ).on( 'post-load', function() {
    if ( 'function' === typeof( galleryView ) )
    galleryView();
    } );
    }
    </script>

    http://wordpress.org/extend/plugins/wordpress-nextgen-galleryview/

  2. ngoodfellow
    Member
    Posted 1 year ago #

    Here is the site I am working on:
    http://formula1moving.com/moving-articles/

    As you can see if you scroll to the second page and run into the photo gallery they show up blank... to get there quickly scroll to the bottom, let the page load and search for "photo"

  3. ngoodfellow
    Member
    Posted 1 year ago #

    After more research it looks like i need to figure out how to build the gallery after the new page has loaded

    here is the script in gallery view:
    // Don't call the buildGallery function until the window is loaded
    // NOTE - lazy way of waiting until all images are loaded, may find a better solution for future versions
    if(!window_loaded) {
    $(window).load(function(){
    window_loaded = true;
    buildGallery();
    });
    } else {
    buildGallery();
    }

    this code here doesnt seem to be working...
    anyone know how to get this working right???

    <script type="text/javascript">
    // Trigger GalleryView gallerybuild for each Infinite Scroll post load
    if ( 'function' === typeof( jQuery ) ) {
    jQuery( document.body ).on( 'post-load', function() {
    if ( 'function' === typeof( buildGallery ) )
    buildGallery();
    } );
    }
    </script>

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic