Template:UCSF/Header
From 2010.igem.org
(Difference between revisions)
Line 83: | Line 83: | ||
var tmp = document.createElement('a'); | var tmp = document.createElement('a'); | ||
var temp = toBeTOCced[i]; | var temp = toBeTOCced[i]; | ||
- | var | + | var MW = temp.getElementsByClassName('mw-headline'); |
- | + | var B = MW.getElementsByClassName('b'); | |
- | + | if(B.length==0){ | |
- | var result = | + | var result = MW.innerHTML; |
+ | } | ||
+ | else{var result = B.innerHTML;} | ||
//alert(result); | //alert(result); | ||
tmp.innerHTML = result; | tmp.innerHTML = result; |
Revision as of 08:03, 10 October 2010