By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,363 Members | 2,358 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,363 IT Pros & Developers. It's quick & easy.

Checking if a <div> is visible

MarkoKlacar
Expert 100+
P: 296
Hi,

I'm using scriptaculous and prototype. I have a div that should be showing while a nother one is not visible and the other way around.

My question is, can I some way detect if a div is showing or nor?

Thanks,
Marko
Nov 6 '08 #1
Share this Question
Share on Google+
3 Replies


acoder
Expert Mod 15k+
P: 16,027
I wouldn't be sure of the exact syntax in prototype/scriptaculous, but in JavaScript you would check the elem.style.display or elem.style.visibility property (depending on which is being used to show/hide).
Nov 6 '08 #2

MarkoKlacar
Expert 100+
P: 296
Hi,

Thanks, it worked lika a charm :-)

/MK
Nov 6 '08 #3

acoder
Expert Mod 15k+
P: 16,027
No problem. You're welcome :)
Nov 6 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.