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 trial

JavaScript

jQuery Basics: Getting Values from form Fields; Task 2 of 2!

What am I doing wrong ??? Please HELP !!

1 Answer

kevin curtis
kevin curtis
15,287 Points

what exactly are you stuck on?

You're on part two of the challenge, so the first part of your code should look like this:

$('button').click(function() {
  var newName = $('#name-input').val();
});

for part two you need to select

$('button').click(function() {
  var newName = $('#name-input').val();
  //your next line of code should go here
  // it will look something like this $(the class you have to select).text(the text that will occupy the element);
});

hope that helps!

Mod Edit: Changed comment to answer so it may be voted on or marked as best answer. Thanks for participating in our community!