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 AJAX Basics (retiring) AJAX and APIs Create a callback function

josefina terrera
josefina terrera
16,506 Points

task 2 ID temperature

I'm having trouble with this task, even thought it looks pretty simple. I don't know where to add the element id: Now you'll add programming to the callback function: you'll display the current temperature of the city you picked. Start by using jQuery to select the element with the ID of temperature.

2 Answers

Hi josefina,

If you check the html you'll see that there's a span with an id of "temperature". So the challenge wants you to select that element so that you'll be able to insert the temperature into that span in the next step.

You can do that in jQuery with $('#temperature');

josefina terrera
josefina terrera
16,506 Points

thanks! Sometimes I get stuck on the details... :) I had forgotten to put #..