See the Pen previewSlider / Thumbnail Preview by Valery Alikin (@AlikinVV) on CodePen.