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

Maarten van Essen
869 PointsSelect not appending
somehow my select is not appending. below is my code
var $select = $('<select></select>'); $("#menu").append($select);
Thanks.

Maarten van Essen
869 PointsPerhaps it has to do with my browser, because I copied and pasted the code form the downloaded material, and it still doesn't work

Maarten van Essen
869 PointsPerhaps it is appending, but I can't see it?
1 Answer

Jonathan Grieve
Treehouse Moderator 91,247 PointsHi Maarten,
I'm guessing here but is it that you need to declare your select HTML tags in a ..html() method?
So
var $select = $("<select></select>").html();
$("#menu").append($select);

Maarten van Essen
869 PointsThanks. Best answer so far ;-) . However still not working. Any other ideas?
Maarten van Essen
869 PointsMaarten van Essen
869 PointsWell copying and pasting isn't going well either...but I think I've mastered the markdown now.
here is the code once more:
What am I doing wrong?