← All challenges
Challenge
Image Carousel
Hard- javascript
- dom
Build a carousel of at least three slides, with colored blocks standing in for images. Previous and next buttons move between them, and a row of dots shows the active slide and jumps to any slide when clicked. Going past either end wraps around.
Notes:
- The starter has a
#trackfor the slides,#prevand#nextbuttons, and an empty#dotscontainer. - Only one slide is in view at a time.
Check your work against
- At least 3 slides
- Next/previous buttons navigate between slides
- Dot indicators show the active slide and are clickable to jump directly to one
- Navigation wraps around (next on the last slide goes to the first, and vice versa)
No automatic grading
Check your work against the list above, then compare it with the solution preview.
Tab indents. Press Esc, then Tab to leave the editor.
Live preview
Starter loaded. The preview updates as you type.