I have a sapui5 table and I am trying to log in the console if the table is being scrolled up or down. I can get it to working if I use a regular div.
Example here.
But I can't seem to get it to work for a sapui5 table. I have tried the following:
var lastScroll = 0;
$("#__xmlview0--players-vsb-sb").scroll(function () {
var st = $(this).scrollTop();
if (st > lastScroll) {
console.log("scrolling down");
} else {
console.log("scrolling up");
}
lastScroll = st;
});
I'm getting the id #__xmlview0--players-vsb-sb
when I inspect element on the scrollbar. This seems like the id I should use. Any ideas of how to get this to work?
Here is my JSBin.