Navigation Menu

Skip to content

Commit

Permalink
Scroll offset control should work only on TOC
Browse files Browse the repository at this point in the history
  • Loading branch information
darashi committed Aug 21, 2012
1 parent 3b314c8 commit 2c3d734
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion public/js/norema.js
Expand Up @@ -4,7 +4,7 @@ $(document).ready(function($) {
$('#query').focus();

// scroll spy
$('.side-nav li a').click(function(event) {
$('.side-nav ul.toc li a').click(function(event) {
event.preventDefault();
$($(this).attr('href'))[0].scrollIntoView();
scrollBy(0, -offset);
Expand Down
2 changes: 1 addition & 1 deletion views/search.jade
Expand Up @@ -51,7 +51,7 @@ block content
span.badge.badge-info= facet.count
if records.length > 0
.well(style="padding: 8px 0;")
ul.nav.nav-list
ul.nav.nav-list.toc
each record, index in records
li
a(href='#'+record.id)
Expand Down

0 comments on commit 2c3d734

Please sign in to comment.