From b991dacff4667b2d7c7fc73239ce46fc14b13ad9 Mon Sep 17 00:00:00 2001 From: Aditya Sharma Date: Sat, 21 Jul 2018 13:49:09 +0530 Subject: [PATCH] Improved scrollToHash function code with specific selector (#2416) When there is a link to content in column-content, the function may scroll to wrong location. Check #legend-hide --- docs/_script_scroll.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_script_scroll.haml b/docs/_script_scroll.haml index ec3ebbc..fb94fe8 100644 --- a/docs/_script_scroll.haml +++ b/docs/_script_scroll.haml @@ -2,7 +2,7 @@ $(function(){ function scrollToHash() { var hash = document.location.hash, - target = $('.column-content a[href^=' + hash + ']'), + target = $('.column-content h3 a[href^=' + hash + ']'), position; if (target.length) { position = target.offset().top - 60;