Team:NTU-Taida/Templates/Footer
From 2012.igem.org
(Difference between revisions)
m |
|||
Line 11: | Line 11: | ||
$('#toc').hide(); | $('#toc').hide(); | ||
$('#toc>tbody>tr>td>ul>li.toclevel-1>a').each(function(index){ | $('#toc>tbody>tr>td>ul>li.toclevel-1>a').each(function(index){ | ||
- | $('ul.sub-navlist').append('<li><a href="'+ $(this).attr('href') +'">'+$(this).children('span.toctext').text()+'</a></li>') | + | $('ul.sub-navlist').append('<li><a href="'+ $(this).attr('href') +'-sec">'+$(this).children('span.toctext').text()+'</a></li>'); |
+ | if(index==0){ | ||
+ | $('h1[class!="firstHeading"]').eq(index).before('<section id="'+$(this).attr('href').slice(1)+'"-sec>') | ||
+ | }else{ | ||
+ | $('h1[class!="firstHeading"]').eq(index).before('</section><section id="'+$(this).attr('href').slice(1)+'"-sec>') | ||
+ | } | ||
+ | |||
$('#toc').remove(); | $('#toc').remove(); | ||
}); | }); |
Revision as of 20:54, 27 August 2012