디스플레이테마 , 인카게임 수정
This commit is contained in:
@@ -498,6 +498,9 @@ function pdpInCarGameSwiperDtl(){
|
||||
}
|
||||
flagScroll = false;
|
||||
}
|
||||
|
||||
|
||||
var beforeDtlImgPath = '';
|
||||
$(document).on("click", ".inCarGame .dtthumb", function(e) {
|
||||
const thumbIdx = e+1;
|
||||
const dtlImgPath = $(this).attr("value");
|
||||
@@ -520,13 +523,14 @@ $(document).on("click", ".inCarGame .dtthumb", function(e) {
|
||||
const pathWithoutFileName = src.substring(0, lastIndex);
|
||||
$(this).attr("src", `${pathWithoutFileName}/${dtlImgPath}-${idx}.png`);
|
||||
});
|
||||
|
||||
$(".inCarGame .video-slide").each(function(e){
|
||||
const idx = e+1;
|
||||
const src = $(this).find(".themeVideo").attr("src");
|
||||
const lastIndex = src.lastIndexOf("/");
|
||||
const pathWithoutFileName = src.substring(0, lastIndex);
|
||||
const videoEle = `
|
||||
<video loop="" muted="" playsinline="" autoplay="" poster="${pathWithoutFileName}/${dtlImgPath}-1.png">
|
||||
<video class="videos" loop="" muted="" playsinline="" autoplay="" poster="${pathWithoutFileName}/${dtlImgPath}-1.png">
|
||||
<source src="${pathWithoutFileName}/${dtlImgPath}-1.mp4" type="video/mp4" class="themeVideo">
|
||||
</video>
|
||||
`;
|
||||
@@ -534,7 +538,11 @@ $(document).on("click", ".inCarGame .dtthumb", function(e) {
|
||||
|
||||
// $(this).attr("src", `${pathWithoutFileName}/${dtlImgPath}-${idx}.mp4`);
|
||||
});
|
||||
|
||||
|
||||
|
||||
$(".inCarGame .video-slideThumb").each(function(e){
|
||||
$(this).removeClass(`${beforeDtlImgPath}`)
|
||||
const idx = e+1;
|
||||
const src = $(this).find(".themeVideo").attr("src");
|
||||
const lastIndex = src.lastIndexOf("/");
|
||||
@@ -544,6 +552,10 @@ $(document).on("click", ".inCarGame .dtthumb", function(e) {
|
||||
<source src="${pathWithoutFileName}/${dtlImgPath}-1.mp4" type="video/mp4" class="themeVideo">
|
||||
</video>
|
||||
`;
|
||||
|
||||
$(this).addClass(`${dtlImgPath}`)
|
||||
|
||||
beforeDtlImgPath = dtlImgPath;
|
||||
$(this).html(videoEle);
|
||||
|
||||
// $(this).attr("src", `${pathWithoutFileName}/${dtlImgPath}-${idx}.mp4`);
|
||||
|
||||
Reference in New Issue
Block a user