content position can''t follow current doc page
kanghaiyang opened this issue · comments
Kang Haiyang commented
with following code, we can fix the issue.
docdock/static/theme-flex/script.js
@@ -170,6 +170,15 @@ jQuery(document).ready(function() {
});
$('article a:not(:has(img)):not(.btn)').addClass('highlight');
+
+ // Fix the scroll's position for the actived content node.
+ try {
+ if( $('.menu .active').offset() ) {
+ var offset = $('.menu .active').offset().top - $('header').height() - 50;
+ $('article > aside').scrollTop(offset);
+ }
+ } catch (e) {}
+
});
Andžs commented
Hi @kanghaiyang,
Could you please expand more what exactly is the issue and how to repeat it?
Thanks!