Important Bits

Challenge: Build a HTML/CSS/JS slideshow without libraries/frameworks/docs? OK!

November 27, 2014

I got most of the way. I needed MDN for checking the usage of:

  • getElementsByClassName
  • clearInterval and clearTimeout
  • css transition syntax

The hard parts were off-by-1 errors and order of operations errors e.g. why does pressing the next button advance the slideshow 2 slides? Because the function that runs on an interval to advance the slideshow automatically already updated the slide index, but the new slide wasn’t displaying yet.

CodePen occasionally didn’t refresh when I expected it to, leaving some errors in the console for longer than I expected.

http://codepen.io/adamsullovey/pen/EajGPy


Adam Sullovey

Written by Adam Sullovey, powered by Gatsby.
Find me on codepen, github, or at Toronto meetups.