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 trialMartin Bornman
Courses Plus Student 12,662 PointsjQuery
My code is as follows: var $select = $("<select></select>"); $("#menu").append($select); With this done and refresh in browser I dont get that bar as is in the video.Why is that?
1 Answer
Jennifer Nordell
Treehouse TeacherMy guess is that you were typing along and thought you'd go back and add the select element later because it is missing from your select variable declaration. You're assigning an empty string to the select variable and then appending it to the document item with the ID of "menu". The end result is that nothing shows. Try this code instead:
var $select = $("<select></select>");
rydavim
18,814 PointsI've changed your comment to an answer so that it may be voted on or marked as best answer.
Martin Bornman
Courses Plus Student 12,662 PointsMartin Bornman
Courses Plus Student 12,662 PointsThanks Jennifer!!I figure it out.The moment I shrink my browser window,the bar appear.