codice:function mostra_box1 () { $("#box1").show("slow"); } function nascondi_box1 (param) { if(param){//se viene passato un parametro alla conclusione della chiusura fai l'apertura $("#box1").hide("slow",function(){$("#box2").show("slow");}); }else{//altrimenti //fai solo la chiusura $("#box1").hide("slow"); } } function mostra_box2 () { var boxaperto1 = $("#box1:hidden"); if(boxaperto1) { nascondi_box1('show2Too'); } else { $("#box2").show("slow"); } } function nascondi_box2 () { $("#box2").hide("slow"); }