Browse Source

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
pull/2423/head
Aditya Sharma 6 years ago committed by Yoshiya Hinosawa
parent
commit
b991dacff4
  1. 2
      docs/_script_scroll.haml

2
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;

Loading…
Cancel
Save