footer.tpl 760 Bytes
<!-- Bootstrap Core JavaScript -->
<script src="static/bootstrap/js/bootstrap.min.js"></script>
	
<!-- Update time JavaScript -->
<script src="static/js/main.js"></script>
<script src="static/js/updatetime.js"></script>
<script src="static/js/new_fields.js"></script>

<script>
			var ToC =
		"<nav role='navigation' class='table-of-contents'>" +
		"<b><?php echo $page_title; ?></b>" +
		"<ul>";

		var newLine, el, title, link;

		$("article h3").each(function() {
			el = $(this);
			title = el.text();
			link = "#" + el.attr("id");
			newLine =
			"<li>" +
			"<a href='" + link + "'>" +
			title +
			"</a>" +
			"</li>";

			ToC += newLine;
		});
		
		ToC +=
		"</ul>" +
		"</nav>";
		
		

		$(".all-chapters").prepend(ToC);
</script>


</body>
</html>