Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Nicholas J Anderson
whats-open
Commits
ef639ff1
Commit
ef639ff1
authored
Oct 27, 2013
by
Renfred Harper
Browse files
Add condition for desktops for smoother transitions
parent
0427b4fe
Changes
1
Hide whitespace changes
Inline
Side-by-side
website/static/js/about.js
View file @
ef639ff1
...
...
@@ -10,12 +10,17 @@ $(document).ready(function(){
$
(
this
).
parent
().
toggleClass
(
'
active
'
);
// Replace "About" link with the close icon
$
(
'
#about-link-text, #about-close-nav
'
).
toggle
();
// Hide grid to disable scrolling when info body is active
// The delay prevents buggy scrolling on some mobile browsers
window
.
setTimeout
(
function
()
{
$
(
'
.main-container
'
).
toggle
()
},
350
);
$
(
'
html, body
'
).
animate
({
scrollTop
:
0
},
500
);
if
(
$
(
window
).
width
()
>=
992
){
// Animation for large displays
$
(
'
.main-container
'
).
slideToggle
(
356
)
}
else
{
// Hide grid to disable scrolling when info body is active
// The delay prevents buggy scrolling on some mobile browsers
window
.
setTimeout
(
function
()
{
$
(
'
.main-container
'
).
toggle
()
},
350
);
$
(
'
html, body
'
).
animate
({
scrollTop
:
0
},
500
);
}
});
$
(
'
#about-close
'
).
click
(
function
(){
$
(
'
#about-link
'
).
parent
().
removeClass
(
'
active
'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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