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 Perform: Part 3

Andrei Punei
Andrei Punei
14,051 Points

How can you cycle through the images using links??

Can anyone point out a simple tutorial on doing this?

can you expand on what you are trying to do? Do you want images as a separate page?

4 Answers

Andrei Punei
Andrei Punei
14,051 Points

I want to append two buttons to the overlay

$overlay.append('<button>Next</button>'); $overlay.append('<button>Previous</button>');

and I want to create a function that cycles through the images when I press them, further more I want to organize the index of the images into an object so that I can display both the image and the alt text

maratfaizov
maratfaizov
14,228 Points

Here is nice and neat CodePen, maybe you will find inspiration from this one. http://codepen.io/Northwest69/pen/gpOMrV

Andrei Punei
Andrei Punei
14,051 Points

This is the thing I am searching for. Thank you!