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
I've wanted to turn this into a grocery list. I have a select box with 6 options 'meats, produce, grains, dairy, snacks, misc.' I need to generate a landing area in the form of a ul.class for each option and that ul's class should be named that options value.
Here is a pen of what I have thus far (because I can't share workspaces.) http://codepen.io/johnweland/pen/iyFEo
I've taken a quick look at your codepen - don't you just need to grab the value of the selected option (which equals the id of the ul element you want to append to?
In your append function you can say something like (notes - I've used $ to show vars):
$element_id = option value; $display_text = input text; $append_to_this = get element by id of $element_id $append_to_this.append li element with $display_text.