I'd like to use the tocify jquery script. In this simple page it doesn't work as expected with Firefox 38.0.1.
It should display a small table of contents in the #toc div. Generated from the scanned tags in the body. But if I render this page in Firefox, nothing happens. It just displays the 'hello' & 'hello2' without the table of contents that tocify is supposed to generate.
Am I doing something wrong in this html code?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="author" content="">
<!-- Tocify - nice dynamic autoscrolling TOC -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/jquery.tocify/1.9.0/stylesheets/jquery.tocify.min.css" rel="stylesheet">
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.tocify/1.9.0/javascripts/jquery.tocify.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var toc = $("#toc").tocify({
scrollTo : 50,
extendPage : true,
selectors : "h1,h2,h3,h4,h5",
showEffect : "fadeIn"
});
});
</script>
</head>
<body>
<div id="toc" ></div>
<h2 id="hello">Hello</h2>
<h2 id="hello2">Hello2</h2>
</body>
</html>