I have a listing of objects as links:

[div: id="listing"]
First
Second
Third

[div: id="description"]
[Object description goes here, initially hidden, contents displayed
based upon which object is clicked above]
[Upon click of new object, hide contents, if displayed, and then
display new contents based upon clicked]
[object above.]

So if I click First, I should see:
     [Description of First object clicked.]

If I click Third, I should see:
     [Description of Third object clicked.]

Now I know I can do this with dozens of individually written click
events calling each one explicitly, but I wanted to know if there was
an easier way with less code. (I have a LOT of links....)

Psuedo-code:
     ON CLICK in #listing {
          IF visible RESET #description
          SHOW hidden #description
          SHOW [clicked object description]
     }

Any help is appreciated. Thanks.

Reply via email to