var toggle = true;
Thanks for your reply. It was somewhat helpful, but I believe that relates only to my deficiencies. I am a graphic designer with little coding experience (have finally convinced managers that some formal instruction in this area would be BENEFICIAL. Adobe Edge seemed like a good program/stopgap fit for my currently limited coding abilities). What I am designing is a map. The map will have five areas initially hidden when you view the map. There is a legend with 5 labels and buttons. What I need is the ability to have each button in the legend act as an independant on-off toggle button, so if you click the button in the legend, the corresponding area on the map is revealed, then, with a second click, hidden. Each button would need to have code attached to it to not only turn on the corresponding area on the map, but change in the legend to an "on" and "off" state or appearance ( black circle is 'off', green circle is 'on'). I can see the logic in your reply, but have been unable to adapt it to my needs. Any further help would be greatly appreciated.
Can you post your files or PM a link to me so I can look at it? I could also PM you some links to files that I have made with similar interaction (copyrighted material). I am developping interactivity for a highschool curriculum. I have used a number of different approach to display map elements as well.
If you have 5 buttons, you can apply the toogle function to each one of them.
You could fill your text with data from an array, same for the map elements.
Sent u a PM with a link. Thanks
Done. Hope it is what you wanted.
Note: code is in composition ready.
An alternative to Maries awesome details is the jquery toggle(), function itself.
Example. in the click event handler of the button, apply
The toggle fuction takes care of the show/hide operations no matter which state or click is made.
Cool Darrell! I'll have to try it! Always learn something new from the pros!