javascript - How can I Open Div in sequence -


i have 3 check boxes chkenglish,chkgerman,chkfrench. according these checkboxes there 3 div, , in these div there textbox , button. mean every checkbox contain block of form mean separate language.

so query when user check checkbox open. if check chkenglish english form must open.after if check chkgerman come under english.

mean according checking checkbox form must open accordingly......

just giving hint how done (i know there many ways):

 var chkname = [......], // array holds check boxes id's       divname = [......], // array holds div elements id's      prevvisiblediv;  for(var i=0; < chkname.length; i++){      if(chkname[i].checked){                       if(prevvisiblediv){ //condition first time.             //hide prevvisiblediv          }          //show divname[i]          //store current visible div inside prevvisiblediv          prevvisiblediv = divname[i];                   } } 

working fiddle


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -