• Hello,

    I am trying to get my NextGen Gallery View Plugin to Display Properly when the Infinite Scrolling loads those posts, however I have not been able to figure it out.

    I found this piece of code on another website but I have not figured out how to implement it to work properly:

    <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>

    The site is:

    http://formula1moving.com/moving-articles/

    If you scroll down you can see the large empty spaces where GalleryView was supposed to load…

    how do I tell the javascript for GalleryView to load after scrolling has reached these posts?

    http://wordpress.org/extend/plugins/jetpack/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor designsimply

    (@designsimply)

    Can you provide some basic testing steps explaining how to reproduce the problem? For example:

    1. Install this http://wordpress.org/extend/plugins/nextgen-gallery/
    2. Make a new post with a gallery an insert this code:

    [put example code here]

    Or whatever the steps are that you used.

    Steps to reproduce are usually the very most helpful thing you can provide when reporting an issue like this.

    Thread Starter ngoodfellow

    (@ngoodfellow)

    Install:

    http://wordpress.org/extend/plugins/jetpack/
    and activate infinite scrolling

    Install:
    http://wordpress.org/extend/plugins/nextgen-gallery/

    and create a gallery

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

    and insert the shortcode into a post

    Post will show up find on the first page but as you scroll down to the second page of posts it does not load the javascript correctly

    the java-script function that appears to need to be loaded is:

    buildGallery()

    to rebuild the gallery after scrolling to load the new post

    I’m not sure how to use this with Infinite Scrolling

    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 have unsuccessfully tried:

    <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>

    Plugin Contributor designsimply

    (@designsimply)

    Thank you for posting steps and detailed info!

    The problem is happening because of the plugin you mentioned:
    http://wordpress.org/extend/plugins/wordpress-nextgen-galleryview/

    That plugin uses jQuery that isn’t properly called after Infinite Scroll loads more posts, so the gallery doesn’t appear. Can you please try contacting the other plugin author directly about this issue to see if there’s anything they can do to fix it from their side?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Scrolling Not Loading Gallery View Javascript -jQuery’ is closed to new replies.