Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bootstrap
bootstrap
Commits
edaeb338
Commit
edaeb338
authored
11 years ago
by
Jacob Thornton
Browse files
Options
Download
Email Patches
Plain Diff
fixed
#8715
parent
a31c5cea
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
assets/js/application.js
+5
-6
assets/js/application.js
with
5 additions
and
6 deletions
+5
-6
assets/js/application.js
+
5
-
6
View file @
edaeb338
...
...
@@ -7,10 +7,11 @@
$
(
function
(){
var
$window
=
$
(
window
)
var
$body
=
$
(
document
.
body
)
var
navHeight
=
$
(
'
.navbar
'
).
outerHeight
(
true
)
+
10
$
(
document
.
body
)
.
scrollspy
({
$body
.
scrollspy
({
target
:
'
.bs-sidebar
'
,
offset
:
navHeight
})
...
...
@@ -19,14 +20,12 @@
e
.
preventDefault
()
})
$
(
document
.
body
)
.
on
(
'
click
'
,
'
.bs-sidenav [href^=#]
'
,
function
(
e
)
{
$body
.
on
(
'
click
'
,
'
.bs-sidenav [href^=#]
'
,
function
(
e
)
{
var
$target
=
$
(
this
.
getAttribute
(
'
href
'
))
//
e.preventDefault() // prevent browser scroll
e
.
preventDefault
()
// prevent browser scroll
document
.
body
.
scrollTop
=
$target
.
offset
().
top
-
navHeight
+
5
// offset scroll by nav
$window
.
scrollTop
(
$target
.
offset
().
top
-
navHeight
+
5
)
})
// back to top
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets