Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
.jscsrc
.jshintrc
bower.json
example.html
gulpfile.js
package.json
readme.md
scrollbarWidth.js
scrollbarWidth.min.js
scrollbarWidth.png

readme.md

scrollbarWidth.js

Get scrollbar width.

ScrollbarWidth.js

Use

  • Set scrollbarWidth.js.
<script src="scrollbarWidth.min.js"></script>
  • Init function & get scrollbar width.
// Init web global
scrollbarWidth(); // 17

// You can also use with jQuery
$.scrollbarWidth(); // 17

// Or AMD/Node/CommonJS
var scrollbarWidth = require('scrollbarWidth');

scrollbarWidth(); // 17

License

Released under the MIT license.