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 trialJohn Wilson
11,739 Pointsjquery plugin sticky "Email Us" class type email-text.
In the sticky jquery plugin lesson. Dave adds the email us feature to the sticky plugin. I understand everything he does except for the extra bit of code he adds at the end in the main.js file.
$(this).append(' <a href="mailto:email@website.com" class="email-text">Email us</a>');
why did he need to add a class "email-text"? and WHAT is that last "Email$nbsp;us" all about???
2 Answers
Bappy Golder
13,449 PointsAlex answered it: "The class is just a css class to style the "Email Us" text. the  is just an html character entity for a blank space."
gennady
14,145 Points  is for non-breaking space. "email-text" is added for future, Dave delete the item later using this class as a selector.
Alex Lewis
15,619 PointsAlex Lewis
15,619 PointsThe class is just a css class to style the "Email Us" text. the
is just an html character entity for a blank space.