xoxco/breakpoints — pull request #2 by rdebeasi (2012-01-02 19:04:26+00:00)
Title: Bugfix: included scroll bar in width calculation

Hey Ben,

I've fixed a bug that I mentioned to you on Twitter a few weeks ago. jQuery doesn't include the scrollbar when calculating window width, but media queries [do include the scrollbar width](http://www.w3.org/TR/css3-mediaqueries/#width). This causes problems on OSes that display scrollbars even when the user isn't scrolling. This happens on Windows and on Mac OS 10.6 and earlier.

As a result, on these platforms the breakpoint that's detected in JS is different from the breakpoint that is actually active. [(Screenshot)](http://cl.ly/CjR4)

To fix the problem, I'm using [jquery.getscrollbarwidth](https://github.com/brandonaaron/jquery-getscrollbarwidth/blob/master/jquery.getscrollbarwidth.js) to calculate the width of the scrollbar, then adding that value to the width that jQuery provides.

Please let me know if you have any questions, and thanks for building this awesome script!

Best,
Ryan