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 trialNoelle Lord
2,136 PointsI can't get the code right on the MASH test. Can someone please help?
I keep getting the following error: The class attribute on both of your <div> elements needs to be set to "favorite_stuff".
I can't see where my code is wrong?
<body>
<h1>First Day of School</h1>
<form>
<div id="answers" class="hide">
</div>
<div>
<div class="favorite_stuff">
<h4>Favorite Foods?</h4>
<input name="food[]">
<input name="food[]">
<input name="food[]">
<input name="food[]">
</div>
<div>
<div class="favorite_stuff">
<h4>Favorite Animals?</h4>
<input name="animal[]">
<input name="animal[]">
<input name="animal[]">
<input name="animal[]">
</div>
</form>
</body>
Noelle Lord
2,136 PointsThis is just on the quiz at the end of the Div tutorial, so I'm not touching the JavaScript. The quiz just keeps saying I got the answer wrong and giving me that error, but I have no idea why it's wrong and the quiz doesn't have a 'show correct answer' option! Ahhhh!
Noelle Lord
2,136 PointsI got it! I was creating more work by putting the div class below the <div> statement, so it wasn't recognizing it. Thanks anyway, though!
1 Answer
Florian Tönjes
Full Stack JavaScript Techdegree Graduate 50,856 PointsHi Noelle,
you inserted new divs, you were asked to give the existing ones the class.
Kind Regards, Florian Tönjes
Savannah Lynn
13,662 PointsSavannah Lynn
13,662 PointsHi, can you post your JavaScript code and maybe the original instructions you're following?