-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Karinna Iniguez - Trek - Octos #38
base: master
Are you sure you want to change the base?
Conversation
TREKWhat We're Looking For
|
|
||
$('#trip-reservation').append( | ||
`<form> | ||
<input type="hidden" name="id" value="${data.id}"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good
$('#trip-list').empty(); | ||
axios.get(URL) | ||
|
||
.then((response) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Desired style is to include this callback directly below the get
function call - rather than adding this additional whitespace
); | ||
|
||
// load form using response data | ||
loadForm(trip); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like that you created the separate form function here. Might also be good to put the trip details HTML in a separate function as well.
|
||
const reserveTrip = (event) => { | ||
event.preventDefault(); | ||
const tripData = $('form').serialize(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting use of serialize
!
TREK
Congratulations! You're submitting your assignment!
Comprehension Questions