gutter support

This commit is contained in:
Fabian Jakobs 2010-04-07 16:27:17 +02:00
commit 99b81b0b04
4 changed files with 65 additions and 12 deletions

16
lib.js
View file

@ -74,6 +74,22 @@ computedStyle = function(element, style)
}
}
scrollbarHeight = function() {
var el = document.createElement("div");
var style = el.style;
style.position = "absolute";
style.left = "-10000px";
style.overflow = "scroll";
style.height = "100px";
document.body.appendChild(el);
var height = el.offsetHeight - el.clientHeight;
document.body.removeChild(el);
return height;
}
bind = function(fcn, context) {
return function() {
return fcn.apply(context, arguments);