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
John Levy
1,451 PointsOpen modal does not open up
I have made a open modal that works but when clicked it first goes to another page and only once the text on that page is clicked it opens up. I made it open straight away but when I did that it would not close so I am back to square one again. I want the open model to open straight away when they click on the image rather than going to the text link first. I have asked this question on several forums and although people have been trying to be helping I am still not having any luck. I have attached the two code below. When the user clicks on the image in the first codepen attached it should open up the second codepen instantly . First code-http://codepen.io/Johned22/pen/rWaLPo second code-http://codepen.io/Johned22/pen/KNwdwW
Thanks in advance
2 Answers
Tony Brackins
28,766 PointsHey John,
So what you'll want to do is have both of the code pens together as one. Then, program the modal to be hidden until you click it, then it appears. Here's a good write up on modals: http://www.w3schools.com/bootstrap/bootstrap_modal.asp
John Levy
1,451 PointsThanks for your help. I finally got it sorted.