Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialUche Onuekwusi
18,070 PointsMy code is not working
$("#addNew").on("click", function(e){
const inputs = $("#newRestaurant").val(); $("ul").append(inputs);
});
2 Answers
Mark Warren
19,252 PointsHi Uche,
You have an unnecessary parameter 'e' in function(e).
Try:
$("#addNew").on("click", function(){
const inputs = $("#newRestaurant").val(); $("ul").append(inputs);
});
Daniel Phillips
26,940 PointsThe input that you are taking the value of has an id="newRestaurantInput"
, you are selecting $("#newRestaurant")
(missing the 'Input' part at the end).
KRIS NIKOLAISEN
54,972 PointsKRIS NIKOLAISEN
54,972 PointsCould you provide this as a snapshot? It is the camera icon in the upper right corner.