Organizational Research By

Surprising Reserch Topic

Experts Most Trusted Topic


how can i check if a scrollbar is visible


how can i check if a scrollbar is visible  using -'javascript,jquery,scroll,overflow'

Is it possible to check the overflow:auto of a div?

For example:

HTML

<div id="my_div" style="width: 100px; height:100px; overflow:auto;" class="my_class">
  * content
</div>


JQUERY

$('.my_class').live('hover', function (event)
{
    if (event.type == 'mouseenter')
    {
         if( ...  if scrollbar visible ? ... )
         {
            alert('true'):
         }
         else
         {
            alert('false'):
         }
    }

});


Sometimes is the content short (no scrollbar) and sometimes long (scrollbar visible).
    

asked Sep 14, 2015 by LemWqa
0 votes
9 views



Related Hot Questions



Walkin Jobs Opening



Government Jobs Opening


...