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 jQuery Basics (2014) Creating a Simple Lightbox Creating and Appending Detached DOM elements

No idea what to do?

This is asking me to use .append(); I'm also assuming it's .append($modal)? It's saying I need to add this to the dismiss button? I have no idea what to do...

Also, can you let me know if my code isn't showing? I'm clicking attach code and it doesn't appear to be attaching it..

Thank you! I spent another 10 minutes trying it out, and got it finally! Thank you for your help!!

1 Answer

Stipe Stipic
Stipe Stipic
17,520 Points

You only need to append the dismissButton to the $modal <br> under: <br> <!-- var $dismissButton = $("<button>Dismiss</button>"); --> <br> put this:<br> <!-- $modal.append($dismissButton); -->

rydavim
rydavim
18,814 Points

I've changed your comment to an answer so that it may be voted on or marked as best answer.