Line 103: | Line 103: | ||
<tr> | <tr> | ||
<td style="font-family:'Comic Sans MS'">6</td> | <td style="font-family:'Comic Sans MS'">6</td> | ||
− | <td style="font-family:'Comic Sans MS'"><a href="#Protein_Characterisation | + | <td style="font-family:'Comic Sans MS'"><a href="#Protein_Characterisation" >Protein Characterisation</a></td> |
</tr> | </tr> | ||
Line 149: | Line 149: | ||
<script> | <script> | ||
function showup(elementID) { | function showup(elementID) { | ||
− | if (!document. | + | if (!document.getElementByID) return false; |
− | + | if (!document.getElementsByClassName) return false; | |
+ | if (!document.getElementsByClassName(" block")) return false; | ||
if (!document.getElementById(elementID)) return false; | if (!document.getElementById(elementID)) return false; | ||
var elem = document.getElementById(elementID); | var elem = document.getElementById(elementID); | ||
document.getElementsByClassName(" block").style.display = "none"; | document.getElementsByClassName(" block").style.display = "none"; | ||
− | |||
elem.style.display = " block"; | elem.style.display = " block"; | ||
+ | |||
} | } | ||
+ | function prepare() { | ||
+ | var links = document.getElementsByTagName('a'); | ||
+ | var blocks = document.getElementsByClassName('block'); | ||
+ | for (var i = 0; i < links; i++) { | ||
+ | links[i].onlick = function () { | ||
+ | showup(blocks[i].id) | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | function addLoadEvent(func) { | ||
+ | var oldonload = window.onload; | ||
+ | if (typeof window.onload != 'function') { | ||
+ | window.onload = func; | ||
+ | } else { | ||
+ | winndow.onload = function () { | ||
+ | oldonload(); | ||
+ | func(); | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | addLoadEvent(prepare()); | ||
+ | |||
</script> | </script> | ||
</html> | </html> | ||
{{SIAT-SCIE footer}} | {{SIAT-SCIE footer}} |
Revision as of 12:35, 20 September 2017