el.style.height not working

J

Jason

Hi Folk

Can someone tell me why this simple example is not working (javascript
wise):

http://www.photowarehouse.co.nz/test.html

Thank you

The reason why this is not working is because the el.style.height is
empty therefore doing parseFloat returns NaN (not a number).
You should use getComputedStyle(el, null) or el.currentStyle (in IE)
to get the height. This will solve your problem.

-Jason
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,164
Messages
2,570,901
Members
47,439
Latest member
elif2sghost

Latest Threads

Top