Forum Discussion
is it possible ?
Try this.
var scrollBox = document.getElementsByClassName("scrollarea-area");
var jqLoader = document.createElement("script");
jqLoader.src = "https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js";
jqLoader.onload = function() {
jqLoader.onload = null;
init();
}
document.head.appendChild(jqLoader);
function init(){
$(window).resize(function(){
var newHeight = scrollBox[0].scrollHeight - scrollBox[0].offsetHeight;
var player = GetPlayer();
var height = newHeight;
});
scrollBox[0].onscroll = function(){
var height = scrollBox[0].scrollHeight - scrollBox[0].offsetHeight;
var player = GetPlayer();
player.SetVar("someNum",scrollBox[0].scrollTop/height*100);
};
}
Then you can set a trigger for what you want to do based on the change of "someNum" variable.