• Resolved Sibbo100

    (@sibbo100)


    Hi Support,

    I’m using this excellent plugin on a client site and it is working perfectly, however I have noticed that the last 2 pages of posts are requiring a click to load the posts but it should be on infinite scroll, this is the only issue I am currently having with the plugin. Any ideas/help would be greatly appreciated.

    Thank you
    Sibbo100

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Darren Cooney

    (@dcooney)

    Hi @sibbo100,
    If you add ‘max_pages=”0″‘ to your shortcode that should solve the issue.

    Cheers,

    Thread Starter Sibbo100

    (@sibbo100)

    Hi dcooney,

    Thank you so much for the speedy response, that worked a treat and loadmore is now working perfectly on that section of our clients site.

    Thank you
    Sibbo100

    Thread Starter Sibbo100

    (@sibbo100)

    Hi dcooney,

    Sorry, another quick question, which isn’t really related to this post, but I’m having an issue with an .on(‘click’) event after the ajax data is loaded, basically once the second page of posts loads the on click which I’m using to show hide various different pieces of content opens and then closes straight away, where as when the page first loads it works perfectly. Any ideas or pointers in the right direction, I’ve been having some real issues with this part.

    Thanks again and awesome plugin
    Sibbo100

    Plugin Author Darren Cooney

    (@dcooney)

    Hi sibbo100,
    no worries.

    If .on(‘click’) is not working I suggest the following:

    $(document).on('click', '.your_element', function(){
       alert("hello!");
    });
    Thread Starter Sibbo100

    (@sibbo100)

    Hi dcooney,

    Thanks for the reply, I don’t think that is it, the code I’m using is:

    jQuery(document).ajaxComplete(function () {
    
    	jQuery('.hideshow .expand').css('display','none');
    	jQuery('.expandBtn span').removeClass('rotate');
       	// Watch for clicks on the "slide" link.
        //jQuery('.hideshow').click(function () {
    	jQuery('.milestone-background').on('click', '.hideshow', function(event){
    		event.preventDefault();
    		jQuery(this).find('span').toggleClass('rotate');
    		if(jQuery(this).next('.expand').css('display') === 'none'){
          		jQuery(this).next('.expand').slideDown(400);
    		}
    		else if(jQuery(this).next('.expand').css('display') === 'block'){
    			jQuery(this).next('.expand').slideUp(400);
    		}
        });
    	
    	var firstyear = jQuery('.milestone').data('year');
    	jQuery('.milestones-container .first span').html(firstyear);
    	
    	var lastyear = jQuery('.milestone').last().data('year');
    	jQuery('.milestones-container .update-year').html(lastyear);
    
    });

    so basically it’s kind of a timeline with various events on various years and each event has a click function that shows the full content, it works fine when page is initially loaded, but after the ajax load more has run, the click event opens the content then closes it straight away, I’m sure it’s something to do with the if else but not sure what.

    Thanks
    Sibbo100

    Plugin Author Darren Cooney

    (@dcooney)

    Hi Sibbo.
    Can you have a look at the almComplete callback function.

    Maybe the issue is the ajaxComplete callback.

    Thread Starter Sibbo100

    (@sibbo100)

    Hey dcooney,

    Tried replacing:
    jQuery(document).ajaxComplete(function () {
    with
    jQuery.fn.almComplete = function(alm){
    and also tried putting it all in a function and it still does the same thing ??

    Thanks
    Sibbo100

    Plugin Author Darren Cooney

    (@dcooney)

    Sounds like the function is being run twice. Does it appear that way?

    Thread Starter Sibbo100

    (@sibbo100)

    Yeah that’s what it looks like to me too, currently trying to run it as 2 different functions 1st click and 2nd click but no luck as of yet.

    Thread Starter Sibbo100

    (@sibbo100)

    Hey dcooney,

    Thanks for helping me along with this, I’ve managed to get it sorted by adding:
    jQuery('.milestone-background').unbind('click');
    just before on click function.

    Thanks again, got to try and get your plugin to work for multiple twitter feeds next that are displayed in the same way, wish me luck ??

    Thanks
    Sibbo100

    Plugin Author Darren Cooney

    (@dcooney)

    Nice work!
    Good luck ! ??

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Infinite Scroll’ is closed to new replies.