javascript - detection of height doesn't work -
javascript - detection of height doesn't work -
i have simple script:
var o = document.getelementbyid("content"); if (o.clientheight == "372") { o.style.height = "328px"; o.style.marginbottom = "44px"; } else { o.style.height = "214px"; o.style.marginbottom = "32px"; } but somehow else executes, if initial height of div 372px... can help me?
clientheight takes padding account. may want utilize scrollheight, offsetheight, or style.height, depending on needs. note style.height not homecoming integer others.
http://help.dottoro.com/ljcadejj.php
javascript
Comments
Post a Comment