Product Thumbnail Slider With Zoom Effect Jquery Codepen <Top — 2025>

.thumbnail-track-wrapper::-webkit-scrollbar-thumb background: #9aaec0; border-radius: 10px;

.thumb-img width: 100%; height: 100%; object-fit: cover; display: block;

/* Lens effect for classic zoom (optional but modern: we use GSAP scaling on mousemove) */ .zoom-lens display: none; product thumbnail slider with zoom effect jquery codepen

.thumb-item flex: 0 0 auto; width: 85px; height: 85px; border-radius: 1rem; overflow: hidden; cursor: pointer; border: 2px solid transparent; transition: all 0.2s ease; background: white; box-shadow: 0 4px 10px rgba(0,0,0,0.05);

.nav-btn background: white; border: none; width: 38px; height: 38px; border-radius: 60px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); cursor: pointer; transition: all 0.2s; color: #1f2b48; font-size: 1rem; .thumb-img width: 100%

/* Thumbnail slider area */ .slider-section margin-top: 0.5rem;

<script> // ---------- PRODUCT DATA (High-res images + thumbnails) ---------- // We'll use a set of curated product-style images from picsum + unsplash style but high quality. // For demo, realistic product variations: watch, bag, sneakers, camera etc. const galleryItems = [ large: "https://picsum.photos/id/20/1200/900", // classic coffee & macbook thumb: "https://picsum.photos/id/20/150/150", alt: "Premium workspace" , large: "https://picsum.photos/id/26/1200/900", // venice water thumb: "https://picsum.photos/id/26/150/150", alt: "Venice inspired" , large: "https://picsum.photos/id/30/1200/900", // coffee beans thumb: "https://picsum.photos/id/30/150/150", alt: "Artisan coffee" , large: "https://picsum.photos/id/42/1200/900", // piano thumb: "https://picsum.photos/id/42/150/150", alt: "Grand piano" , large: "https://picsum.photos/id/52/1200/900", // canyon thumb: "https://picsum.photos/id/52/150/150", alt: "Desert canyon" , large: "https://picsum.photos/id/96/1200/900", // mountain thumb: "https://picsum.photos/id/96/150/150", alt: "Alpine vista" ]; .thumb-item flex: 0 0 auto

// ---------- Build thumbnails dynamically ---------- function buildThumbnails() $thumbTrack.empty(); galleryItems.forEach((item, idx) => const thumbDiv = $('<div>').addClass('thumb-item'); if (idx === currentIndex) thumbDiv.addClass('active-thumb'); const img = $('<img>').addClass('thumb-img').attr('src', item.thumb).attr('alt', `Thumb $idx+1`); thumbDiv.append(img); thumbDiv.on('click', (function(index) return function() setActiveImage(index); ; )(idx)); $thumbTrack.append(thumbDiv); ); // update active highlight after building updateActiveThumbnail();

<!-- Thumbnail slider with arrows --> <div class="slider-section"> <div class="slider-header"> <span class="slider-title"><i class="fas fa-images"></i> Product gallery</span> <div class="nav-buttons"> <button class="nav-btn" id="prevThumbBtn" aria-label="Previous"><i class="fas fa-chevron-left"></i></button> <button class="nav-btn" id="nextThumbBtn" aria-label="Next"><i class="fas fa-chevron-right"></i></button> </div> </div> <div class="thumbnail-track-wrapper" id="thumbWrapper"> <div class="thumbnail-track" id="thumbTrack"> <!-- dynamic thumbnails will be injected via JS --> </div> </div> </div> </div> </div>