Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
troy beckett12,035 Points
thumbnails in gallery
Please take a look at my codepen :
What I currently have is 4 scaled down images in a div with a class "thumbnails".
What I want to do is to be able to click the thumbnails and the reveal the full size picture in a div next to it with the class "large-image".
Any advice on achieving this would be great
Without giving you a code example as it would be more beneficial for you to attempt this yourself I'll explain a simple solution. This solution will require you to use jQuery.
Create the large div element and style and position it as you want then add a style display:none; to it.
Now implement a jQuery method click for any 'img'. Then when a use clicks on an image, you can (amongst other ways) 'clone()' the element and set the 'html()' of the large div to the cloned component.
If you can't figure it out, post what you get done in you're code pen here and then I'll try and help you further.