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

iphone - Dismissing a UIAlertView -

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

javascript - Change element in each JQuery tab to dynamically generated colors -