Add table of contents to documentation pages
[exim-website.git] / templates / web / doc / index.js
index 9ba9546174ea654bf1f1636990a001c30314b9ae..c656046af923c51917ee05089dcdce2d73ce49e0 100644 (file)
@@ -1,18 +1,10 @@
-$('#chapters')
-       .addClass('expandable')
-       .find('.button')
-       .click(function(){
-               $(this).parent().toggleClass('open');
-       });
-
-$('#options img.expand')
-       .click(function(){
-               $('.chapter').addClass('open')
-       });
-
-$('#options img.collapse')
-       .click(function(){
-               $('.chapter').removeClass('open')
-       });
-
-$('#options').removeClass('hidden');
+// Add the expand/collapse functionality
+       $('#chapters')
+               .addClass('expandable')
+               .find('.button')
+               .click(function(){
+                       $(this).parent().toggleClass('open');
+               });
+       $('#options img.expand').click(function(){ $('.chapter').addClass('open'); });
+       $('#options img.collapse').click(function(){ $('.chapter').removeClass('open') });
+       $('#options').removeClass('hidden');