(function ($, undefined, width){ '$:nomunge'; $.scrollbarWidth = function (){ var parent, child; if (width === undefined) { parent = $('
').appendTo('body'); child = parent.children(); width = child.innerWidth() - child.height(99).innerWidth(); parent.remove(); } return width; } ; } )(jQuery);