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

Popular posts from this blog

ios - Fragment Shader GLSL for texture, color and texture/color -

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -