"Auto scroll content"
Bootstrap 4.1.1 Snippet by ugnandish

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container"> <div class="row"> <table> <tr> <td> Window Scroll : </td> <td>0</td> <td> Document height : </td><td>0</td> <td> Window Height : </td><td>0</td> </tr> </table> <div id="content" align="center"> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> This is My Content<br/> </pre> <div id="loading"> Loading Please Wait...... </div> </div> </div>
*{ font-family: verdana; } table{ width: 100%; padding:5px 10px; position: fixed; top: 0; left: 0; text-align: center; color:white; background: rgba(0,0,23,0.71); box-shadow: 0 0 10px black; } #content{ padding-bottom: 60px; } #loading{ display:none; width: 100%; padding:5px 10px; position: fixed; bottom: 0; left: 0; text-align: center; color:white; background: rgba(0,0,23,0.71); box-shadow: 0 0 10px black; } table td:nth-child(2n){ width:50px; background: white; box-shadow: 0 0 10px white; color:black; } table td:nth-child(1n){ text-shadow: 0 0 10px white; }
var count=0; $(document).ready(function(){ SetValues(); $(window).scroll(function(){ //Will check if the user has reached bottom of a PAGE SetValues(); //Check for user has reached bottom of Page if($(window).scrollTop()==($(document).height()-window.innerHeight)){ $('#loading').fadeIn(); setTimeout("appendContent()", 1000); } }); }); var appendContent=function(){ //alert("You are At Bottom"); $('#content').append("@@@@@@@@@ ---------- "+count+" TIMES ---------- @@@@@@@@@<br/>"); count++; for(var i=0;i<10;i++){ alert(i); $('#content').append("This is Dynamic Added Content<br/>"); } $('#loading').fadeOut(); }; var SetValues=function(){ $('table tr:first-child td:nth-child(2)').html($(window).scrollTop()); $('table tr:first-child td:nth-child(4)').html($(document).height()); $('table tr:first-child td:nth-child(6)').html(window.innerHeight);//$(window).height() };

Related: See More


Questions / Comments: