code: function scrollbarWidth() {
        // Append a temporary scrolling element to the DOM, then measure
        // the difference between between its outer and inner elements.
        var tempEl = $('<div class="scrollbar-width-tester" style="width:50px;height:50px;overflow-y:scroll;position:absolute;top:-200px;left:-200px;"><div style="height:100px;"></div>');
        $('body').append(tempEl);
        var width = $(tempEl).innerWidth();
        var widthMinusScrollbars = $('div', tempEl).innerWidth();
        tempEl.remove();
        // On OS X if the scrollbar is set to auto hide it will have zero width. On webkit we can still
        // hide it using ::-webkit-scrollbar { width:0; height:0; } but there is no moz equivalent. So we're
        // forced to sniff Firefox and return a hard-coded scrollbar width. I know, I know...
        if (width === widthMinusScrollbars && navigator.userAgent.toLowerCase().indexOf('firefox') > -1) {
          return 17;
        }
        return (width - widthMinusScrollbars);
      }
docs: Calculate scrollbar width
  
  Original function by Jonathan Sharp:
  http://jdsharp.us/jQuery/minute/calculate-scrollbar-width.php
  Updated to work in Chrome v25.