| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
Senior Member
Join Date: Oct 2004
Location: Chester
Posts: 364
|
DOM - Show/Hide Content
Hi all, Have used the code from Zeldman, and it shows content on a toggle kind of system. Well thats good, but I am creating a help system for my application and I want to have help topics in the left panel, and when I click on a topic it shows the information in the right panel. With me so far? What I want is it to toggle any content that is not needed to display none, when a different topic is clicked. Is this possible? |
|
|
|
|
|
#10 (permalink) |
|
Senior Member
Join Date: Oct 2004
Location: Chester
Posts: 364
|
Look people, if I have made a gramma error, i'm sorry, but doesn't mean you are not clever, so don't judge me. All I did was come onto a site where I actually believe there is a good community. I never came on and said do this and I want this, and I want it now. I am learning DOM, and in particular show/hide content. I see this site as a good source of help. All I have got was a negative response and a go and find it on Google. Well if I have been on Google but I never found exactly what I was looking for, that's why I came back to this forum. I have never once insulted anyone, and Stickmus has just come on and made a comment that is insulting to me. |
|
|
|
#11 (permalink) |
|
hmmm...
Join Date: Jan 2004
Location: Yorkuk
Posts: 2,127
|
Haha, it was a joke, calm down dear. Try writing a hide all function, then run that before you show the specific one. getElementById and getElementsByTagName should be the key here. And if you're using firefox, I always find the DOM inspector ctrl+shift+i to be of great help when developing javascript stuff. |
|
|
|
#12 (permalink) |
|
Senior Member
Join Date: Oct 2004
Location: Chester
Posts: 364
|
Not a problem Stickmus, its Monday afterall, and the diazipan is only just kicking in. Well I think I have got some code that works. PHP Code:
It seems to work ok, I would have to add numerous options to the var, but I think I understand it. |
|
![]() |