Answers for "javascript detect if element is scrolled"

0

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 */
Posted by: Guest on May-05-2020

Code answers related to "javascript detect if element is scrolled"

Code answers related to "Javascript"

Browse Popular Code Answers by Language