Skip to main content

Posts

Showing posts with the label overflow

Jquery - Check: If scrollbar visible (div with overflow:auto)

is it possible to check the overflow:auto from 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). Thanks in advance! Peter Source: Tips4all