I have a div
with overflow: auto
(a vertical scroll bar appears if the div
contains a lot info).
How could I identify at some point if the vertical scroll bar appears or not ?
I have a div
with overflow: auto
(a vertical scroll bar appears if the div
contains a lot info).
How could I identify at some point if the vertical scroll bar appears or not ?
From http://bytes.com/topic/javascript/answers/157924-detect-if-scrollbars-visible-inside-div:
if (document.getElementById('divID').scrollHeight > document.getElementById('divID').clientHeight)
{
//a vertical scroll bar is present
}
else
{
//a vertical scroll bar is NOT present
}