Skip to content

Commit

Permalink
fixing flatdoc white theme js error
Browse files Browse the repository at this point in the history
  • Loading branch information
soldair committed Mar 20, 2014
1 parent 642db27 commit a8f2106
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions api-the-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ var api = pinoccioAPI();
(function(){

$(document).on('flatdoc:ready', function() {
console.log('RUNNING INIT')
o.init();
});

Expand Down
5 changes: 4 additions & 1 deletion flatdoc/v/0.8.0/theme-white/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@
});

$document.on('flatdoc:ready', function(){
$document.scrollTop($('#'+window.location.hash.substring(1))[0].offsetTop+80);
if(window.location.hash && window.location.hash.length > 1) {
var el = $('#'+window.location.hash.substring(1))[0];
if(el) $document.scrollTop(el.offsetTop+80);
}
})

/*
Expand Down

1 comment on commit a8f2106

@jingman
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, thanks.

Please sign in to comment.