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

c# - Move local mssql database to webhosted MYSQL -

java - How to pass parameters between Request-Scoped Controllers? -

string - what is the difference between "some" == "some\0" and strcmp("some","some\0") in c++? -