Skip to content

Commit fc34686

Browse files
committed
fixed highlight bug & modified .gitignore
1 parent a84ea51 commit fc34686

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
/site/es
1616
/site/zhtw
1717
/site/it
18+
/site/hu
1819
*.md~
1920
*.src.md
2021
*.DS_store

site/javascript/garden.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ Sections.prototype = {
1818
},
1919

2020
map: function() {
21-
this.names = $('section [id]').map(function(idx, ele) {
21+
this.names = $('section>[id]').map(function(idx, ele) {
2222
return {
2323
id: this.id.replace('.intro', ''),
24-
offset: $(this).offset().top - 20,
24+
offset: $(this).offset().top - 100,
2525
title: $(this).find(':header:first').html()
2626
};
2727

@@ -33,7 +33,7 @@ Sections.prototype = {
3333
articleID = this.names[this.names.length - 1].id;
3434

3535
for(var i = 0, l = this.names.length; i < l; i++) {
36-
if (scroll > 0 && this.names[i].offset > scroll) {
36+
if (scroll >= 0 && this.names[i].offset > scroll) {
3737
articleID = this.names[i - 1].id;
3838
break;
3939
}

0 commit comments

Comments
 (0)