I added a scroll binding to my body tag
<body style="" data-bind="event : { scroll: scrollingInboxMessagesBox }">
and its corresponding listener
model.scrollingInboxMessagesBox = function (data,event) {
var body = $('body');
if (body.scrollTop == (body.scrollHeight - body.offsetHeight)) //scrollTop is 0 based
{
alert('Reached the bottom!');
}
console.log("body " + body.scrollHeight - body.offsetHeight);
console.log($("body").scrollTop());
};
but i noticed the even never fires the listeners, when i try other events like "mouseover", it works. why is this ?