[#9] Update table of contents function

This commit is contained in:
Anastasiya Shamray 2023-05-26 20:16:25 +03:00 committed by Stanislav Bogatyrev
parent 1ed372a791
commit bf439c2673

View file

@ -130,13 +130,7 @@
// table of contents
$('h3, h4, h5', '.content').each(function () {
$(this).append('<a class="title-link" href="#' + $(this).attr('id') + '"> #</a>');
$(this).hover(function(){
$(this).find('a').addClass('active');
}, function(){
$(this).find('a').removeClass('active');
});
$(this).append('<a class="title-link" href="#' + $(this).attr('id') + '">#</a>');
});