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

William Hickok
William Hickok
4,139 Points

I have 0 clue how to do this.

Take a moment to read the code in the app.js file. The code should display a model or pop-over window (built with HTML). In the modal window there should be a place for a message to display and a button to dismiss or close the modal. Check out how the code runs in the preview. There's something wrong. The dismiss button isn't showing in the modal. Can you fix it?

4 Answers

Ken Alger
STAFF
Ken Alger
Treehouse Teacher

William;

We need to append the $dismissButton to our modal window. If you are still stuck, post back.

Happy coding,
Ken

I am completely lost on this as well. Any help would be appreciated.

Calvin Secrest
Calvin Secrest
24,815 Points

The code challenge is asking you to fix the dismiss button in the preview //Create a button to dismiss modal and add it to modal var $dismissButton = $("<button>Dismiss</button>"); $modal.append($dismissButton);

Learning coding
seal-mask
.a{fill-rule:evenodd;}techdegree
Learning coding
Front End Web Development Techdegree Student 9,937 Points

I was lost here too. It clicked for me when I googled on modal window. I thought "modal window" was some kind of code, but it's a window in the window screen. And that is where you want to append the dismissButton.