As esailija said, duplicate of: Detecting presence of a scroll bar in a DIV using jQuery?
The solution there was the following
var div= document.getElementById('something'); // need real DOM Node, not jQuery wrapper
var hasVerticalScrollbar= div.scrollHeight>div.clientHeight;
var hasHorizontalScrollbar= div.scrollWidth>div.clientWidth;