Skip to content

Commit

Permalink
Improve documentation menu (#745)
Browse files Browse the repository at this point in the history
Fixes a issue where the menu is out of sync with the content on-screen.
  • Loading branch information
serverwentdown authored and hacksparrow committed Jan 9, 2017
1 parent 88b8bb7 commit e9b186f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/app.js
Expand Up @@ -85,9 +85,9 @@ $(function(){
var prev;
var n = 0;

var headings = $('.h2, h3').map(function(i, el){
var headings = $('h2, h3').map(function(i, el){
return {
top: $(el).offset().top - 100,
top: $(el).offset().top - 200,
id: el.id
}
});
Expand All @@ -98,7 +98,7 @@ $(function(){
var i = headings.length;
while (i--) {
h = headings[i];
if (top >= h.top - 1) return h;
if (top >= h.top) return h;
}
}

Expand Down

0 comments on commit e9b186f

Please sign in to comment.