Calculate heading height properly
This commit is contained in:
parent
f143b1852b
commit
129e9563a2
1 changed files with 2 additions and 1 deletions
|
@ -23,6 +23,7 @@ $(document).ready(function() {
|
|||
}
|
||||
|
||||
var calcNsPositions = function() {
|
||||
var hheight = $('.docs-header').first().height();
|
||||
var nss = []
|
||||
var anchors = []
|
||||
var positions = []
|
||||
|
@ -31,7 +32,7 @@ $(document).ready(function() {
|
|||
nss.push(ns)
|
||||
var a = $("a[name='"+ns+"']")
|
||||
anchors.push(a)
|
||||
positions.push(a.offset().top - 50)
|
||||
positions.push(a.offset().top - hheight)
|
||||
// console.log(a.offset().top)
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue