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 trial

JavaScript Using jQuery Plugins Add a Sticky Navigation Bar The Plugin Challenge Solution

Aurora Ruggieri
Aurora Ruggieri
4,361 Points

I do not see the addition of text Email Us

Hello to all guys, I can not see the Email Us text that I added with the append () method, I added the class="work" in the work.html file.

Can you help me figure out what has gone wrong?

$('.work').on('sticky-start', function(){ $('this').append( '<a href="mailto:email@website.com" class="email-text">Email us</a>' ); });

$('.work').on('sticky-end', function(){ $('.email-text').remove(); });

A greeting

Aurora Ruggieri
Aurora Ruggieri
4,361 Points

Hi everyone , I found the mistake, I wrote (this) in single quotes, now everything is ok.

Aurora

1 Answer

Michael Liendo
Michael Liendo
15,326 Points

Aurora Ruggieri Nice work, thanks for reaching out and feel free to post any other issues you come across. Keep up the great job!