-
Button to Show/Hide Div
I am trying to create a button which makes a div appear when clicked and disappear when clicked again.... then appear, then disappear.
I'm nearly there, the div appears, but then rather than just that div disappearing when you click again, everything disappears! I'm sure its simple to work out for people who are confident using Javascript. Not for me though!
Here's the link
www.standardcraze.co.uk/test.htm
Thanks
-
You are iterating through an array which contains references to all the divs on the page and then setting them to display:none. The problem is everything on the page is in a div. If you want to exclude the button for example then either take it out of the enclosing div or give it an id and branch your code to step over it in the array.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules