인카게임 추가
This commit is contained in:
@@ -400,18 +400,18 @@ function pdpInCarGameSwiper(){
|
||||
delay:1,
|
||||
disableOnInteraction: true,
|
||||
},
|
||||
speed: 3000,
|
||||
speed: 2400,
|
||||
breakpoints: {
|
||||
// when window width is >= 320px
|
||||
320: {
|
||||
spaceBetween: 10,
|
||||
spaceBetween: 5,
|
||||
},
|
||||
// when window width is >= 480px
|
||||
480: {
|
||||
},
|
||||
// when window width is >= 640px
|
||||
640: {
|
||||
spaceBetween: 20,
|
||||
spaceBetween: 10,
|
||||
}
|
||||
},
|
||||
// navigation: {
|
||||
@@ -420,6 +420,7 @@ function pdpInCarGameSwiper(){
|
||||
// },
|
||||
on: {
|
||||
init: function () {
|
||||
console.log('pdpInCarGameSwiper 실행한다')
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -448,10 +449,10 @@ function pdpInCarGameSwiperDtl(){
|
||||
});
|
||||
var inCarGameSwiper2 = new Swiper(".inCarGameDtl", {
|
||||
spaceBetween: 10,
|
||||
navigation: {
|
||||
nextEl: ".swiper-button-next",
|
||||
prevEl: ".swiper-button-prev",
|
||||
},
|
||||
// navigation: {
|
||||
// nextEl: ".inCarGameDtl .swiper-button-next",
|
||||
// prevEl: ".inCarGameDtl .swiper-button-prev",
|
||||
// },
|
||||
thumbs: {
|
||||
swiper: inCarGameSwiper,
|
||||
},
|
||||
@@ -460,7 +461,43 @@ function pdpInCarGameSwiperDtl(){
|
||||
|
||||
flagScroll = false;
|
||||
}
|
||||
$(document).on("click", ".dtthumb", function() {
|
||||
$(document).on("click", ".inCarGame .dtthumb", function() {
|
||||
|
||||
const dtlImgPath = $(this).attr("value");
|
||||
const dtlImgs = $(".inCarGame .dtlImgs");
|
||||
$(".inCarGame .dtthumb").removeClass("active");
|
||||
$(this).addClass("active");
|
||||
|
||||
$('.inCarGame .dtlImgs .item').addClass('change')
|
||||
setTimeout(function() {
|
||||
$('.inCarGame .dtlImgs .item').removeClass('change')
|
||||
}, 200);
|
||||
|
||||
$(".inCarGame .themeImg").each(function(e){
|
||||
const idx = e+1;
|
||||
const src = $(this).attr("src");
|
||||
const lastIndex = src.lastIndexOf("/");
|
||||
const pathWithoutFileName = src.substring(0, lastIndex);
|
||||
|
||||
$(this).attr("src", `${pathWithoutFileName}/${dtlImgPath}-${idx}.png`);
|
||||
});
|
||||
$(".inCarGame .themeImgThumb").each(function(e){
|
||||
const idx = e+1;
|
||||
const src = $(this).attr("src");
|
||||
const lastIndex = src.lastIndexOf("/");
|
||||
const pathWithoutFileName = src.substring(0, lastIndex);
|
||||
|
||||
$(this).attr("src", `${pathWithoutFileName}/${dtlImgPath}-${idx}.png`);
|
||||
});
|
||||
// const visualBgSrc = $(".visualBg img").attr("src");
|
||||
// const visualBgLastIndex = visualBgSrc.lastIndexOf("/");
|
||||
// const visualBgPathWithoutFileName = visualBgSrc.substring(0, visualBgLastIndex);
|
||||
|
||||
// $(".visualBg img").attr("src", `${visualBgPathWithoutFileName}/${dtlImgPath}_screen.jpg`);
|
||||
|
||||
flagAutoPlay = false;
|
||||
});
|
||||
$(document).on("click", ".displayTheme .dtthumb", function() {
|
||||
|
||||
const dtlImgPath = $(this).attr("value");
|
||||
const dtlImgs = $(".dtlImgs");
|
||||
@@ -480,9 +517,9 @@ $(document).on("click", ".dtthumb", function() {
|
||||
|
||||
$(this).attr("src", `${pathWithoutFileName}/${dtlImgPath}-${idx}.png`);
|
||||
});
|
||||
const visualBgSrc = $(".visualBg img").attr("src");
|
||||
const visualBgLastIndex = visualBgSrc.lastIndexOf("/");
|
||||
const visualBgPathWithoutFileName = visualBgSrc.substring(0, visualBgLastIndex);
|
||||
// const visualBgSrc = $(".visualBg img").attr("src");
|
||||
// const visualBgLastIndex = visualBgSrc.lastIndexOf("/");
|
||||
// const visualBgPathWithoutFileName = visualBgSrc.substring(0, visualBgLastIndex);
|
||||
|
||||
// $(".visualBg img").attr("src", `${visualBgPathWithoutFileName}/${dtlImgPath}_screen.jpg`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user