[#9] Update table of contents function

This commit is contained in:
Anastasiya Shamray 2023-05-26 20:16:25 +03:00
parent ef08ba9d6d
commit 9e2a1518cf

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>');
});