Calculate heading height properly

This commit is contained in:
Ivan Miskovic 2012-01-14 19:45:08 +13:00
parent f143b1852b
commit 129e9563a2

View file

@ -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)
});