$(document).ready(function() { // Check if body height is higher than window height :) if ($("body").height() > $(window).height()) { alert("Vertical Scrollbar! D:"); } // Check if body width is higher than window width :) if ($("body").width() > $(window).width()) { alert("Horizontal Scrollbar! D:<"); } });
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter