jquery check if div is scrollable 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 */