Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

24 lines (24 sloc) 0.98 kB
<!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>
Jump to Line
Something went wrong with that request. Please try again.