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
Zoheb Lokhandwala
whats-open
Commits
2283645e
Commit
2283645e
authored
Oct 26, 2013
by
Renfred Harper
Browse files
Set delay on hide functions to smooth mobile rendering
parent
fd66c5ec
Changes
2
Hide whitespace changes
Inline
Side-by-side
website/static/js/about.js
View file @
2283645e
...
...
@@ -11,11 +11,11 @@ $(document).ready(function(){
$
(
this
).
parent
().
toggleClass
(
'
active
'
);
// Replace "About" link with the close icon
$
(
'
#about-link-text, #about-close-nav
'
).
toggle
();
//
Prevent body from
scolling when
about section
is active
$
(
'
.main-container
'
).
slideToggle
(
500
);
// Scroll back to top
//
Hide grid to disable
sc
r
olling 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
scrollTop
:
0
},
500
);
});
$
(
'
#about-close
'
).
click
(
function
(){
...
...
website/static/js/info.js
View file @
2283645e
...
...
@@ -95,12 +95,9 @@ $(document).ready(function() {
lastClicked
=
grid_id
;
}
if
(
$
(
window
).
width
()
<
992
)
{
// On mobile displays, hide grid to disable scrolling when info body is active
$
(
'
.main-container
'
).
slideToggle
(
500
);
// Scroll to top of page to prevent body from going out of view
$
(
'
html, body
'
).
animate
({
scrollTop
:
0
},
430
);
// On mobile displays, 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
);
}
});
$
(
'
#info-close
'
).
click
(
function
()
{
...
...
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