Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Зуев Егор
/
wiki.dev
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Authored by
Nick Walke
2016-02-11 12:15:16 -0600
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Commit
eacff3a9f0d9a0828e5a29c848ee4862beb0022b
eacff3a9
1 parent
17d4533e
Fixes #45
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletions
resources/assets/js/pages/page-show.js
resources/assets/js/pages/page-show.js
View file @
eacff3a
...
...
@@ -72,4 +72,19 @@ window.setupPageShow = module.exports = function (pageId) {
goToText
(
text
);
}
};
\ No newline at end of file
// Get current tree's width
var
bookTreeWidth
=
$
(
".book-tree"
).
width
();
// Get header height
var
headerHeight
=
$
(
"#header"
).
height
()
+
$
(
".faded-small"
).
height
();
$
(
window
).
scroll
(
function
()
{
if
(
$
(
window
).
scrollTop
()
>
headerHeight
){
// Begin to scroll
$
(
".book-tree"
).
width
(
bookTreeWidth
);
$
(
".book-tree"
).
css
(
"position"
,
"fixed"
);
$
(
".book-tree"
).
css
(
"top"
,
0
);
}
else
{
// Lock it back in place
$
(
".book-tree"
).
css
(
"position"
,
"relative"
);
}
})
};
...
...
Please
register
or
sign in
to post a comment