Skip to content

meodai/scroll-width

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

scroll-width

Because not everyone hides the scrollbar on OSX ;) Tiny AMD module that will return you the browsers scrollbar width can be installed via bower, AMD is optional.

Installation

NPM

  npm install scroll-width --save

yarn

  yarn add scroll-width

Bower

  bower install scroll-width --save

AMD usage:

  require(['scrollWidth'], function(scrollWidth){
    alert("My scroll's width is " + scrollWidth + "px");
  });

without AMD:

  alert("My scroll's width is " + window.scrollWidth + "px");