I am trying to get the div width for my function using javascript:
#areaDraw { margin-top:50px; width: 50%; min-height: 100%; z-index: 1000; }
and function:
Event.add(window, "resize", function() { sketch.resize(document.getElementById("areaDraw").style.width, window.innerHeight); }).listener();
somehow javscript always returns 0 for div width (areaDraw)
so not so:
document.getElementById("areaDraw").style.width
source share