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 trialvamosrope14
14,932 PointsWhy was it not appropriate to use .html when appending the span tags?
.
1 Answer
Steven Parker
229,785 PointsThe code being appended in this exercise is HTML code. It's just being added to the page by the JavaScript program.
Steven Parker
229,785 PointsAmandeep Pasricha — Did this resolve your issue? You can mark a question solved by choosing a "best answer".
And happy coding!
Kristaps Vecvagars
6,193 PointsKristaps Vecvagars
6,193 PointsI'm not sure, if it is so, but I treat .html() method almost the same as I would treat .innerHTML in vanilla JS.
For example, this was my solution for task 4/5:
I used .html() to get the innerHTML content of the <a> tags, while Treasure used .text().