Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

content position can''t follow current doc page #176

Open
kanghaiyang opened this issue Jan 9, 2019 · 1 comment
Open

content position can''t follow current doc page #176

kanghaiyang opened this issue Jan 9, 2019 · 1 comment

Comments

@kanghaiyang
Copy link

kanghaiyang commented Jan 9, 2019

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) {}
+
 });

@Pilskalns
Copy link

Hi @kanghaiyang,

Could you please expand more what exactly is the issue and how to repeat it?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants