silverstripe-cms/thirdparty/jquery-getscrollbarwidth/example.html

24 lines
980 B
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>jQuery getScrollBarWidth example</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="jquery.getScrollbarWidth.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
$(function() {
$('#width').text( $.getScrollbarWidth() );
});
</script>
<style type="text/css" media="screen">
#example { width: 100px; height: 100px; overflow: auto; }
#example div { width: 100%; height: 200px; background: #ccc; border: 1px solid #000; }
</style>
</head>
<body>
<h1>jQuery <code>getScrollbarWidth</code> Snippet Example</h1>
<p>The scrollbar width is <span id="width"></span></p>
<div id="example"><div></div></div>
</body>
</html>