-
Notifications
You must be signed in to change notification settings - Fork 48
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
Sockets - Karla #43
base: master
Are you sure you want to change the base?
Sockets - Karla #43
Conversation
TREKWhat We're Looking For
|
return trekDetail; | ||
}; | ||
const clickedTrek = showTrekDetails(trek); | ||
$("li").click(clickedTrek); |
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.
So everytime I load the list of trips you add a new event handler to listen for events on the li
elements. This means, if I click on See TREKS
3 times and click on one of the trips it will call clickedTrek
3 times.
This is better to do with event delegation or use $('li').off();
to clear the event handlers before adding a new one.
// $('#reservation-form').submit(makeReservation); | ||
}); | ||
|
||
console.log('dee is here!'); |
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.
Hi Dee!
@@ -0,0 +1,155 @@ | |||
const URL = 'https://trektravel.herokuapp.com/trips/'; |
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.
Only submit the files that actually run please!
TREK
Congratulations! You're submitting your assignment!
Comprehension Questions
Trip
in the list by its ID field. Would it be advantageous to keep the list in order by the id field? Explain why or why not.