Javascript – Jquery function is not working with infinitescroll

It happens most of the time that if you are using ifinitescroll js than your JavaScript will work for the first page but for other pages which will reload using infinite scroll, your JavaScript sucks at that.

So, you can use this way for resolving and making the JavaScript work with your infinite scroll function.

JavaScript Solution=>

$(document).ready(function() {
  $(“#feeds_div”).infinitescroll({
    navSelector: “nav.pagination”,
    nextSelector: “nav.pagination a[rel=next]”,
    itemSelector: “#feeds_div .feed_obj”
  },
  function(){
    alert(1);
    //Your code
  }
  );
});

About the author

Being the CEO and Founder of ClecoTech International, Mr. Ashish Prajapati is dedicated towards his aim of mentoring young startups into a full-fledged businesses. He is helping startups from America, Europe, India, and various other countries through proper guidance and the use of latest technologies to develop their innovation and ideas into definite realities.

Leave a Reply

Your email address will not be published.