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!
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
Viki Bigler4,664 Points
I'm lost on this challenge, jQuery: set a value. How do I select the correct input then set its value to the fullName?
'''//Show Prompt Window and store value var fullName = prompt("What is your full name?");
//Select Input with the id of #fullName var $select = $("<select></select>"); $("#fullName").val($select); //Insert value in to full name input
Sergey Podgornyy20,660 Points
The val method is actually going to display value it needs the variable that's being passed into it.
So the first is the actual section of the required input element, jQuery is attaching the action to the input by its ID. Then the
val() method is being called on it with a value.