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 trialBrandon Battles
3,315 PointsCode Challenge - Introduction to jQuery
$(".error").show();
$("a").before(<span>This is a link:</span>);
Before every link add this HTML: <span>This is a link;</span>
I must be missing something, because with this markup it continues to return the error that Task 1 is no longer passing. Help, please.
5 Answers
Wade Christensen
Treehouse TeacherYou need to place your html inside quotation marks.
$("a").before('<span>This is a link: </span>');
Also, notice the space between the colon at the end of the word "link" and the </span>
smonneger
9,874 PointsHey Brandon,
<span>This is a link:</span>
must be between double quotes:
```"<span>This is a link:</span>"
Louis Otto
23,264 PointsHi Sacha, that won't work, the quotations need to be outside of the <span> tags themselves
smonneger
9,874 PointsThx Louis, I noticed my mistake. I modified it :p
Louis Otto
23,264 PointsRemember to wrap in quotation marks, you're very close but you just need to wrap the <span> tags in " like this:
$("a").before("<span>This is a link: </span>");
Jonathan Davies
Courses Plus Student 4,765 Points$(".error").show(); $("a").before("<span>This is a link: </span>");
U have forgotten the "DOUBLE QUOTE" marks from the string in the before method.
Brandon Battles
3,315 PointsAwesome! Thank you all so much for your help!