Here is an example:
<!DOCTYPE html>_x000D_
<html>_x000D_
<head>_x000D_
<title>Demo: Lazy Loader</title>_x000D_
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>_x000D_
<style>_x000D_
#myScroll {_x000D_
border: 1px solid #999;_x000D_
}_x000D_
_x000D_
p {_x000D_
border: 1px solid #ccc;_x000D_
padding: 50px;_x000D_
text-align: center;_x000D_
}_x000D_
_x000D_
.loading {_x000D_
color: red;_x000D_
}_x000D_
.dynamic {_x000D_
background-color:#ccc;_x000D_
color:#000;_x000D_
}_x000D_
</style>_x000D_
<script>_x000D_
var counter=0;_x000D_
$(window).scroll(function () {_x000D_
if ($(window).scrollTop() == $(document).height() - $(window).height() && counter < 2) {_x000D_
appendData();_x000D_
}_x000D_
});_x000D_
function appendData() {_x000D_
var html = '';_x000D_
for (i = 0; i < 10; i++) {_x000D_
html += '<p class="dynamic">Dynamic Data : This is test data.<br />Next line.</p>';_x000D_
}_x000D_
$('#myScroll').append(html);_x000D_
counter++;_x000D_
_x000D_
if(counter==2)_x000D_
$('#myScroll').append('<button id="uniqueButton" style="margin-left: 50%; background-color: powderblue;">Click</button><br /><br />');_x000D_
}_x000D_
</script>_x000D_
</head>_x000D_
<body>_x000D_
<div id="myScroll">_x000D_
<p>_x000D_
Contents will load here!!!.<br />_x000D_
</p>_x000D_
<p >This is test data.<br />Next line.</p>_x000D_
<p >This is test data.<br />Next line.</p>_x000D_
<p >This is test data.<br />Next line.</p>_x000D_
<p >This is test data.<br />Next line.</p>_x000D_
<p >This is test data.<br />Next line.</p>_x000D_
<p >This is test data.<br />Next line.</p>_x000D_
<p >This is test data.<br />Next line.</p>_x000D_
<p >This is test data.<br />Next line.</p>_x000D_
<p >This is test data.<br />Next line.</p>_x000D_
<p >This is test data.<br />Next line.</p>_x000D_
<p >This is test data.<br />Next line.</p>_x000D_
<p >This is test data.<br />Next line.</p>_x000D_
<p >This is test data.<br />Next line.</p>_x000D_
<p >This is test data.<br />Next line.</p>_x000D_
<p >This is test data.<br />Next line.</p>_x000D_
<p >This is test data.<br />Next line.</p>_x000D_
<p >This is test data.<br />Next line.</p>_x000D_
<p >This is test data.<br />Next line.</p>_x000D_
<p >This is test data.<br />Next line.</p>_x000D_
<p >This is test data.<br />Next line.</p>_x000D_
<p >This is test data.<br />Next line.</p>_x000D_
<p >This is test data.<br />Next line.</p>_x000D_
</div>_x000D_
</body>_x000D_
</html>
_x000D_