well somethng like this really helped.
function yHandler () {
var wrap = document. getElementById('wrap');
var contentHeight = wrap.offsetHeight;
var yOffset = window.pageYOffset;
var y = yOffset + window.innerHeight;
if (y >= contentHeight) {
wrap.innerHTML += '<div class="newData"></div>';
}
}
window.onscroll = yHandler;
solved Make a webpage display more items on mouse hover at the bootom?