Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="window.scrollbars test">
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width,initial-scale=1">
  <title>window.scrollbars test - JS Bin</title>
</head>
<body>
</body>
</html>
 
$( function () {
  var $body = $( document.body );
  
  report ( "window.scrollbars is " + ( window.scrollbars ? "" : "not " ) + "available" );
  
  if ( window.scrollbars ) {
    
    report ( "No scrollbars: window.scrollbars.visible = " + window.scrollbars.visible );
    
    $body.css( { 
      minHeight: "1px",
      minWidth: "5000px" 
    } );
    
    report ( "Horizontal scrollbar only: window.scrollbars.visible = " + window.scrollbars.visible );
    
    $body.css( { 
      minHeight: "5000px",
      minWidth: "1px" 
    } );
    
    report ( "Vertical scrollbar only: window.scrollbars.visible = " + window.scrollbars.visible );
    
    $body.css( { 
      minHeight: "5000px",
      minWidth: "5000px" 
    } );
    
    report ( "Both scrollbars: window.scrollbars.visible = " + window.scrollbars.visible );
    
  }
  
  
} );
function report ( message ) {
  $( "<p/>" )
    .text( message )
    .appendTo ( document.body );
}
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
hashchangepro
0viewers