Toggle problem pls help me

Posted by John the horn on Stack Overflow See other posts from Stack Overflow or by John the horn
Published on 2010-04-26T12:51:04Z Indexed on 2010/04/26 12:53 UTC
Read the original article Hit count: 294

Filed under:
|
|
|
|

Hy I am a uber nube to jquery my question is like this:

if I have multiple toggle on same page and the div I`m toggleing must be desplayed in the same div.

For example I have in div 'box' 6 divs named '1' '2' '3' '4' etc and all are hiden if I click on a 'a' tag named 1 it will display content div 1 in div 'box' if I click tag 'a' named 2 will display content div 2 in box and hide div 1 etc. My problem is that I havent been able to hide div 1 if div 2 is show

This is my code

$(document).ready(function(){

$('#content1').hide(); $('#content').hide();

$('a.aici').click(function(){

$('#content1').toggle('slow');

});

$('a.acolo').click(function(){

$('#content').toggle('slow');

});

});

I need an if function to hide all except the div that is shown

Thx for your time

© Stack Overflow or respective owner

Related posts about showhide

Related posts about multiple