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
016cf23e
Commit
016cf23e
authored
Oct 15, 2013
by
Renfred Harper
Browse files
Change info.js to slide down after info is rendered
parent
fdc03f8a
Changes
1
Hide whitespace changes
Inline
Side-by-side
website/static/js/info.js
View file @
016cf23e
...
...
@@ -35,18 +35,7 @@ $(document).ready(function() {
});
// Displays more info about a restaurant on-click
$
(
document
).
on
(
'
click
'
,
'
.grid-box
'
,
function
()
{
// If the user clicks on the same box twice it will close the info menu
grid_id
=
$
(
this
).
attr
(
'
id
'
);
if
(
lastClicked
==
grid_id
){
$
(
'
#info-body
'
).
slideToggle
(
300
)
}
else
{
// Empty the schedule before sliding down in case the new
// schedule is shorter
$
(
'
#info-schedule
'
).
empty
();
$
(
'
#info-body
'
).
slideDown
(
300
);
lastClicked
=
grid_id
;
}
// Search though the restaurnts object to find the selected restaurant's info
var
restaurant
;
$
.
each
(
restaurants
,
function
(
idx
,
restaurant_i
)
{
...
...
@@ -97,5 +86,13 @@ $(document).ready(function() {
element
=
''
;
}
}
// If the user clicks on the same box twice it will close the info menu
if
(
lastClicked
==
grid_id
){
$
(
'
#info-body
'
).
slideToggle
(
300
)
}
else
{
$
(
'
#info-body
'
).
slideDown
(
300
);
lastClicked
=
grid_id
;
}
});
});
\ No newline at end of file
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