Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Bruno

    (@xiaoxu125634)

    Sorry for delayed reply.

    This plugin not support ajax requested content.

    But you can do some change in source file if you can.

    In front.php file, line 123, change:
    var _lazyimgs = $(“img.ls_lazyimg”);
    ->
    window._lazyimgs = $(“img.ls_lazyimg”);

    In ajax request feedback function, add one line below:
    window._lazyimgs = $(“img.ls_lazyimg”);

    Thread Starter Steve D

    (@steadwell)

    Thanks for responding,

    When you say “In ajax request feedback function…” do you mean “callback”?

    I’m using the Jetpack infinite scroll and have it enabled in my theme in the functions.php. Can I add this “callback”, the
    window._lazyimgs = $("img.ls_lazyimg");
    in my functions.php? That would seem best to avoid being written over when jetpack is updated.

    The code in my functions.php to enable the infinite scroll is:

    function book_lite_setup() {
    
    	/**
    	 * Enable support for Infinite Scroll
    	 */
    	add_theme_support( 'infinite-scroll', array(
    		'type'           => 'scroll',
    		'container'      => 'main',
    		'footer'	 => 'main',
    		'footer_callback'	 => 'my_footer',
    	) );
    
    }
    endif; // book_lite_setup
    add_action( 'after_setup_theme', 'book_lite_setup' );

    Could I add the suggested line to that?

    Thanks again!

    Thread Starter Steve D

    (@steadwell)

    Bruno,

    Thanks for your help, I’ll work out your suggestion through the Jetpack forum and mark this as resolved, but in future releases you may want to consider adding infinite scroll/ajax capabilities.

    Great plugin by the way, Kudos to you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Loading Images in Subsequent Pages with Infinite Scroll’ is closed to new replies.