footer.tpl 898 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 type="text/javascript" src="static/select2/select2.js"></script>

<script type="text/javascript">
	$('select').select2();

</script>

<script>
			var ToC =
		"<nav role='navigation' class='table-of-contents'>" +
		"<strong>{$page_title}</strong>" +
		"<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>