m |
m |
||
Line 42: | Line 42: | ||
<script> | <script> | ||
$(document).ready(function() { | $(document).ready(function() { | ||
+ | document.getElementById('compl').appendChild(document.getElementById('toc')); | ||
$('#toc').children("ul").addClass("nav"); | $('#toc').children("ul").addClass("nav"); | ||
$('#toc').children("ul").attr('id', 'tocnav'); | $('#toc').children("ul").attr('id', 'tocnav'); | ||
$('body').scrollspy({ target: '#tocnav', offset:40 }); | $('body').scrollspy({ target: '#tocnav', offset:40 }); | ||
− | + | ||
+ | $('#toc').on('activate.bs.scrollspy', function () { | ||
$('li.active').prevAll().addClass('before'); | $('li.active').prevAll().addClass('before'); | ||
$('li.active').removeClass('before'); | $('li.active').removeClass('before'); | ||
$('li.active').nextAll().removeClass('before'); | $('li.active').nextAll().removeClass('before'); | ||
})*/ | })*/ | ||
− | |||
− | |||
}); | }); | ||
</script> | </script> |
Revision as of 15:59, 16 July 2016