Skip to content

madromas/EsoTalk_InfiniteScroll

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

EsoTalk_InfiniteScroll

Infinite Scroll For Main page

Open: /core/views/default.master.php

Add this right after <body> tag

 <script>
$(function(){ //on document ready
   $(document).scroll(function (e) { //bind scroll event

       var intBottomMargin = 10; //Pixels from bottom when script should trigger

       //if less than intBottomMargin px from bottom
       if ($(window).scrollTop() >= $(document).height() - $(window).height() - intBottomMargin) {
           $(".viewMore").click(); //trigger click
       }

   });
});
</script>

Open: /core/views/conversations/list.php

find: line 27

<li class='viewMore'>
<a href='<?php

Add: class='viewMore' to <a>

<li class='viewMore'>
<a class='viewMore' href='<?php

Done!


For mobile edit: /addons/skins/YOUR_SKIN/views/mobile.master.php

And add same code after <body> tag:

<script>
$(function(){ //on document ready
  $(document).scroll(function (e) { //bind scroll event

      var intBottomMargin = 10; //Pixels from bottom when script should trigger

      //if less than intBottomMargin px from bottom
      if ($(window).scrollTop() >= $(document).height() - $(window).height() - intBottomMargin) {
          $(".viewMore").click(); //trigger click
      }

  });
});
</script>

About

Infinite Scroll For Main page

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published