m41189854804
(function(){
if (window.__PRODUCT_LIGHTBOX__) return;
window.__PRODUCT_LIGHTBOX__ = true;
const CANDS=[
'#product-images img','.product-images img','.gallery img','.images-grid img','.images img','[data-lightbox] img'
];
function findImgs(){
for(const sel of CANDS){
const list=Array.from(document.querySelectorAll(sel)).filter(img=>img.src&&getComputedStyle(img).display!=='none');
if(list.length) return list;
} return [];
}
const imgs=findImgs(); if(!imgs.length) return;
const ov=document.createElement('div');
ov.id='lb-overlay';
ov.innerHTML=`
`;
document.body.appendChild(ov);
const imgEl=ov.querySelector('#lb-img');
const prev=ov.querySelector('#lb-prev'), next=ov.querySelector('#lb-next'), close=ov.querySelector('#lb-close');
const leftZ=ov.querySelector('#lb-leftZone'), rightZ=ov.querySelector('#lb-rightZone');
let idx=0, open=false, startX=null;
const full=(img)=> img.getAttribute('data-full') || img.src;
const show=(i)=>{ idx=(i+imgs.length)%imgs.length; imgEl.src=full(imgs[idx]); };
const openBox=(i)=>{ open=true; document.documentElement.style.overflow='hidden'; ov.classList.add('is-open'); show(i); };
const closeBox=()=>{ open=false; ov.classList.remove('is-open'); document.documentElement.style.overflow=''; imgEl.src=''; };
imgs.forEach((img,i)=>{ img.style.cursor='zoom-in'; img.addEventListener('click',e=>{e.preventDefault(); openBox(i);}); });
prev.addEventListener('click',()=>show(idx-1));
next.addEventListener('click',()=>show(idx+1));
close.addEventListener('click',closeBox);
ov.addEventListener('click',e=>{ if(!e.target.closest('#lb-stage')) closeBox(); });
leftZ.addEventListener('click',()=>show(idx-1));
rightZ.addEventListener('click',()=>show(idx+1));
window.addEventListener('keydown',e=>{ if(!open) return; if(e.key==='Escape') closeBox(); else if(e.key==='ArrowLeft') show(idx-1); else if(e.key==='ArrowRight') show(idx+1); });
imgEl.addEventListener('touchstart',e=>{ startX=e.touches[0].clientX; },{passive:true});
imgEl.addEventListener('touchmove',e=>{ if(startX===null) return; const dx=e.touches[0].clientX-startX; if(Math.abs(dx)>40){ if(dx>0) show(idx-1); else show(idx+1); startX=null; } },{passive:true});
imgEl.addEventListener('touchend',()=>{ startX=null; });
})();>سلع مشابهة
السعر: 1,780 ¥
≈ 11.93 $ • ≈ 17,293 IQD
★トミカ マツダ RX-8 パトロールカー 未使用品 ★購入後暗所保管の未使用品です。★未使用ですが、量産品のモデルです ので生産時の塗装ムラや塗装浮き、キズ等が有る場合がありますので神経質な方はご遠慮下さい。すり替え防止の為、返品は一切受け付けませんのでご了承お願いいたします。★画像をよくご確認お願いいたします。★他にも出品していますので宜しくお願いいたします。また、迅速なお取引を心がけますが、当方、仕事の都合上、連絡が遅くなる場合いがありますのでご了承お願いいたします。 3