tag:blogger.com,1999:blog-865923359735383241.post8647574447081832169..comments2023-10-29T07:27:09.012-06:00Comments on Ccna final exam - java, php, javascript, ios, cshap all in one: Jquery - Check: If scrollbar visible (div with overflow:auto)Unknownnoreply@blogger.comBlogger3125tag:blogger.com,1999:blog-865923359735383241.post-68154800227362081322012-04-08T20:38:57.865-06:002012-04-08T20:38:57.865-06:00Maybe a more simple solution.if ($(document).heigh...Maybe a more simple solution.<br><br>if ($(document).height() > $(window).height()) {<br> // scrollbar<br>}Tips For Allhttp://www.blogger.com/profile/11557173689529910046noreply@blogger.comtag:blogger.com,1999:blog-865923359735383241.post-86267730896574243562012-04-08T20:38:56.950-06:002012-04-08T20:38:56.950-06:00I should change a little thing of what Reigel said...I should change a little thing of what Reigel said:<br><br>(function($) {<br> $.fn.hasScrollBar = function() {<br> return this.get(0).scrollHeight > this.innerHeight();<br> }<br>})(jQuery);<br><br><br>innerHeight counts control's height and it's top and bottom paddingsTips For Allhttp://www.blogger.com/profile/11557173689529910046noreply@blogger.comtag:blogger.com,1999:blog-865923359735383241.post-28025339270157040142012-04-08T20:38:56.074-06:002012-04-08T20:38:56.074-06:00You need element.scrollHeight. Compare it with $(e...You need element.scrollHeight. Compare it with $(element).height().Tips For Allhttp://www.blogger.com/profile/11557173689529910046noreply@blogger.com