• Resolved craig21

    (@craig21)


    Hi,

    I have installed the plugin and embedded my shortcode accordingly which has allowed the AJAX request to be made successfully.

    My issue is that the almComplete callback is not firing after the Ajax request.
    I have tried to console.log something from inside that function and nothing appear.

    I have checked that I am loading my JS after the plugin JS.

    Any help would be appreciated.

    Thanks!

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

    (@dcooney)

    Hi @craig21,
    Are there any errors in your browser console?

    What is the code you are using?

    Cheers,

    Thread Starter craig21

    (@craig21)

    No errors in the console.

    I outputted a console.log after the almComplete function to make sure that my JS was reaching that line just in case there were any errors.

    Code is

    $.fn.almComplete = function(alm) {
    console.log(‘complete’);
    };

    Right now I have just put this in between script tags at the bottom of footer.php to be absolutely sure this is the last bit of JS being executed on the page.

    Thanks again!

    Plugin Author Darren Cooney

    (@dcooney)

    You will the entire code wrapper as seen below.

    $(function() {
      $.fn.almComplete = function(alm){
        console.log("Ajax Load More Complete!");
      };
    })(jQuery);

    Try that!

    Thread Starter craig21

    (@craig21)

    Getting this in the console now

    TypeError: $(…) is not a function

    I am definitely loading jQuery before all my scripts though? I think I am missing something simple!

    Plugin Author Darren Cooney

    (@dcooney)

    There is an FAQ question on this.
    https://connekthq.com/plugins/ajax-load-more/docs/faqs/#16

    Also, pages of results on Google is you search for $ is not a function.

    Hope this helps.

    Cheers

    Thread Starter craig21

    (@craig21)

    Thanks for that.

    That removed the error in the console but still not outputting my console.log within the almComplete callback!

    Thanks for your help

    Plugin Author Darren Cooney

    (@dcooney)

    Can you share a link to the issue please?

    Cheers,

    Thread Starter craig21

    (@craig21)

    Hi,

    Is there a way to send a private message on here and I can share a link with yourself?

    Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘almComplete not firing’ is closed to new replies.