Difference between revisions of "Template:SJTU-BioX-Shanghai/Alpha/Header"

Line 2: Line 2:
  
 
<script>
 
<script>
alert('x');
 
 
function hide_nav_click(btn) {
 
function hide_nav_click(btn) {
 
   alert('hide')
 
   alert('hide')
Line 8: Line 7:
 
   var nav = btn.parentNode;
 
   var nav = btn.parentNode;
 
   var svg = btn.firstChild;
 
   var svg = btn.firstChild;
   console.log(svg)
+
   svg.setNamedItem("transform", "matrix(1,0,0,-1,0,5)")
 
   nav.classList.add('nav-hided')
 
   nav.classList.add('nav-hided')
 
}
 
}
Line 16: Line 15:
 
   var nav = btn.parentNode;
 
   var nav = btn.parentNode;
 
   var svg = btn.firstChild;
 
   var svg = btn.firstChild;
   console.log(svg)
+
   svg.removeNamedItem("transform")
 
   nav.classList.remove('nav-hided')
 
   nav.classList.remove('nav-hided')
 
}
 
}

Revision as of 01:15, 11 August 2015