Hi everybody,

could you help please with the right js-code (jquery is welcome)


code here:
http://screenlabor.de/ronny/test2.html

I have 3 divs with id's like: food, stills, interieur.

Each div is representing a category and contains some thumbnails and a
bigger picture.
Only one div/category is visible at the same time, the others are
hidden with display:none.

I want to set up a simple function that allows me toggle only one div
at the same time, the others should stay hidden (-->swapping):



<div id="food" class="gallery" style="display:block;">content</div>

<div id="stills" class="gallery" style="display:none;">content</div>

<div id="interieur" class="gallery" style="display:none;">content</
div>



the logic for jquery should be sth like this, right?

a) find all divs with class 'gallery'
b) find out if it is set hidden or visible
c) if it is visible do nothing
d) if it is hidden, set this div visible, set others hidden

What would be the apropiate jqiery code?
Can you lead me to the proper jquery code in IRC #jouery step by step?


Thanks and sincere
Dennis




About:
-------------------------
Im a beginner for javascript but advanced for xhtml/css and want to
ask some questions which will have some didactic character. (My aim is
to learn, not to get things/examples done by the community :0)


Reply via email to