Viewing 2 replies - 1 through 2 (of 2 total)
  • @markkelly1982: The quick way to fix this issue is by triggering a method after ajax load:
    addthis.toolbox('.addthis_toolbox');

    i have the problem too. I am newer to wordpress and i tried a lot to solve it,
    i have the page counter,and each time i click the load more button,the page is counted and finally load more button disappears when the count finishes. But the problem is that,i can see only the first displayed images but no more than that.The images should be loaded each time i click the load more button.here is my ajax code :

    [ Moderator note: code fixed. Please wrap code in the backtick character or use the code button. ]

    <script type="text/javascript">
    $(document).ready(function(){
    	$('#blog_page_number').val(2);
    });
    function load_more_blog()
    {
    	var btn = $('.load-button a.load');
    	btn.button('loading');
    	var blog_page_number = $('#blog_page_number').val();
    	var maxnews_page_number = $('#maxnews_page_number').val();
    	var parameter = "action=filter_result&paged="+blog_page_number;
    	if(parseInt(blog_page_number) > parseInt(maxnews_page_number) ) return false;
    	$.ajax({
    		type: "GET",
    		url: "<?php bloginfo('template_url'); ?>/template-seemore.php",
    		data: parameter,
    		success: function(data){
    			btn.button('reset');
    			$('#blog_list_load .item:last').after(data);
    			var nextNum = parseInt(blog_page_number) + 1;
    			$('#blog_page_number').val(nextNum);
    			if(parseInt(blog_page_number) == parseInt(maxnews_page_number) ){
    				$("#load-more-blog").html('');
    			} else {
    				$("#load-more-blog").html('<a href="void(0);">LOAD MORE</a>');
    			}
    		}
    	});
    }
    </script>
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Buttons not working when load more posts clicked’ is closed to new replies.