Skip to content

Instantly share code, notes, and snippets.

document.addEventListener('DOMContentLoaded', () => {
const images = Array.from(document.querySelectorAll('img'));
// Kaydırma mantığını yöneten ana fonksiyon
const navigate = (direction, currentImg) => {
const currentIndex = images.indexOf(currentImg);
const targetImg = direction === 'next' ? images[currentIndex + 1] : images[currentIndex - 1];
if (targetImg) {
targetImg.scrollIntoView({ behavior: 'smooth', block: 'start' });