Toggle problem pls help me
- by John the horn
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