When the web page is too long so that scrollbar shows up, $(document).width() will show different result between Chrome/FF and IE.
Chrome/FF will get the width without scrollbar's width, but IE will take the scrollbar as one part of document.
If we want to calculate the absolute position of any element, it may be helpful.
评论