-
Notifications
You must be signed in to change notification settings - Fork 42
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
Jan Edrozo | Carets #33
base: master
Are you sure you want to change the base?
Conversation
…en button(All Trips) is clicked
TREKWhat We're Looking For
The styles look great :) Submitting your reservation form isn't making a POST request for me. The code is also breaking about a reference to Overall, good job with the project-- Let's talk about what happened with the reservation form submission! |
index.js
Outdated
// To Reserve Trip | ||
$('#single-trip-info').on('submit', '#reservation', function(response) { | ||
console.log('Button reserve trip clicked'); | ||
event.preventDefault(); |
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.
You're right-- the callback that you pass in as the third parameter to .on(...)
should be a function that takes in one parameter. In this case, you name it response
, but it does represent the event object that describes the event that triggered this handler.
On this line, (line 169) you call event.preventDefault();
. However, event
is not defined within this scope, so the JS breaks at this point.
If you rename response
to event
, the app works as expected.
…d adding additional bottom and padding and margin in #reservation-modal section
TREK
Congratulations! You're submitting your assignment!
Comprehension Questions