WordPress.org

Ready to get started?Download WordPress

Forums

AJAX Read More
[resolved] Using with Infinite Scroll (6 posts)

  1. alaninteractive
    Member
    Posted 2 years ago #

    Hi. I have the plugin working, but when new posts are loaded via Infinite Scroll, the Read More links do not load inline, but go through to the individual post page.

    So I am wondering how to refresh the more-link bindings in Infinite Scroll's callback.

    Thanks

    http://wordpress.org/extend/plugins/ajax-read-more/

  2. friksson
    Member
    Posted 1 year ago #

    Same problem as above.

    I need to know... What Javascript to be called after the next posts are fetched?

    I other words. What Javascript function applies to the read more button when the page loads? I need to load it manually again.

    Thanks!

  3. friksson
    Member
    Posted 1 year ago #

    Anyone? Can someone point me in the right direction? A have sadly poor skills in JavaScript.

    Tnaks

  4. Sergey.S.Betke
    Member
    Plugin Author

    Posted 1 year ago #

    Excuse me for so long pause. Example - in ajax-read-next-page plugin:

    jQuery(function() {
    	jQuery('#content')
    		.delegate('', 'onupdate.ajaxReadMore', function(e) {
    			jQuery('.page-container'/*, e.target*/).AJAXReadMore({
    				ajaxData: {
    					'ajax-read-next-page-mode':'1.0.0'
    				},
    				contentElSelector: ".page-container",
    				errorMessage: "Ошибка загрузки следующей страницы.<br/>Попробуйте позднее.",
    				moreElSelector: ".nextpostslink",
    				moreContainerSelector: ".navigation",
    				scrollToSelector: ".navigation"
    			});
    		})
    		.trigger('onupdate.ajaxReadMore')
    	;
    });

    You must:
    jQuery('#content').trigger('onupdate.ajaxReadMore')
    after new content loaded. And all .more links will be prepared to work with ajax-read more.
    P.S. Excuse me for my english.

  5. friksson
    Member
    Posted 1 year ago #

    Thank you, will try it!

  6. twitah
    Member
    Posted 1 year ago #

    Where i can put that code? And what i should edit?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic