...

View Full Version : Hide/show spans using other spans



dukejackson
11-11-2009, 05:26 PM
Hello everyone.

I am building a subscription directory website and I need help developing a code that will perform this function:

I want to be able to hide certain spans when another span appears on the page.

In other words, the page will normally display <span id="spanA"> and <span id="spanB">.

However, when <span id="spanC"> appears on a page, I want to set display:none for spanA and spanB.

I know how to toggle between display:none and display:block using a call to a javascript function like a link with an "onClick"

Perhaps there a way I could code a span in CSS to toggle this javascript function when it appears on the page?

Thank you for any help!

abduraooft
11-12-2009, 07:38 AM
However, when <span id="spanC"> appears on a page, I want to set display:none for spanA and spanB. How do you know the time when that span become visible? Or which event/action is controlling the visibility of that span?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum