how to detect if window is scrolled using JS ? code example
Example: javascript detect if element is scrolled
var div = document.getElementById('container_div_id');
var hasHorizontalScrollbar = div.scrollWidth > div.clientWidth;
var hasVerticalScrollbar = div.scrollHeight > div.clientHeight;
/* returns true/false */