12345678910111213141516171819202122232425262728293031323334 |
- function change()
- {
- var parent = document.getElementById('parent');
- var children = parent.childNodes;
- console.log(children);
- if(children[1].style.display=="block"){
- document.getElementById('eng').style.display = "none";
- document.getElementById('esp').style.display = "block";
- var x = document.getElementsByClassName('esp');
- var i;
- for(i = 0; i<x.length; i++){
- x[i].style.display = "block";
- }
- var x = document.getElementsByClassName('eng');
- for(i = 0; i<x.length; i++){
- x[i].style.display = "none";
- }
- }
- else if(children[1].style.display=="none"){
- document.getElementById('eng').style.display = "block";
- document.getElementById('esp').style.display = "none";
- var x = document.getElementsByClassName('esp');
- var i;
- for(i = 0; i<x.length; i++){
- x[i].style.display = "none";
- }
- var x = document.getElementsByClassName('eng');
- for(i = 0; i<x.length; i++){
- x[i].style.display = "block";
- }
- }
- }
|