Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions antiscroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -451,16 +451,16 @@

function scrollbarSize () {
if (size === undefined) {
var div = $(
var $div = $(
'<div class="antiscroll-inner" style="width:50px;height:50px;overflow-y:scroll;'
+ 'position:absolute;top:-200px;left:-200px;"><div style="height:100px;width:100%">'
+ '</div>'
);

$('body').append(div);
var w1 = $(div).innerWidth();
var w2 = $('div', div).innerWidth();
$(div).remove();
$('body').append($div);
var w1 = $div.innerWidth();
var w2 = $('div', $div).innerWidth();
$div.remove();

size = w1 - w2;
}
Expand Down