Thank you very much to both of you, I'm in your debt ;) I prefer real method tho! hehe
Have a good day, - Israel --------------------- $(function(){ $('.Boite').each(function(){ $(this).find('div').hide(); }); $('.Boite a').click(function(){ $(this).parent().find('div').toggle(); }); }) > > On Sep 5, 1:38 pm, "israel.hayes" <[EMAIL PROTECTED]> wrote: > > > Hi, > > > I was using MooTools before and I'm kinda new to jQuery, I'd like to > > know how you would modify this to use it in jQuery, Thanks, > > > - Israel > > > window.addEvent('domready', function() > > { > > var Boites = $$('.Boite'); > > > Boites.each(function(Boite) > > { > > var Lien = Boite.getElement('a'); > > > Lien.addEvent('click', function() > > { > > var Boite = Lien.getParent(); > > var Contenu = Boite.getElement('div'); > > > if(Contenu.style.display == "none") > > { > > Contenu.style.display = "block"; > > } > > else > > { > > Contenu.style.display = "none"; > > } > > }); > > > var Contenu = Boite.getElement('div'); > > Contenu.style.display = 'none'; > > }); > > > });