|
|
@@ -31,14 +31,14 @@
|
|
|
<input type="hidden" name="addPrice" />
|
|
|
<input type="hidden" name="ordQty" />
|
|
|
<input type="hidden" name="stock" />
|
|
|
- <input type="hidden" name="minOrdQty"/>
|
|
|
- <input type="hidden" name="maxOrdQty"/>
|
|
|
+ <input type="hidden" name="minOrdQty" th:value="${goodsInfo.minOrdQty}"/>
|
|
|
+ <input type="hidden" name="maxOrdQty" th:value="${goodsInfo.maxOrdQty}"/>
|
|
|
<input type="hidden" name="currPrice" th:value="${goodsInfo.currPrice}"/>
|
|
|
<input type="hidden" name="goodsType" th:value="${goodsInfo.goodsType}"/>
|
|
|
<input type="hidden" name="selfGoodsYn" th:value="${goodsInfo.selfGoodsYn}"/>
|
|
|
<main role="" id="" class="container pd" th:with="imgGoodsUrl=${@environment.getProperty('upload.goods.view')}, uxImgUrl=${@environment.getProperty('domain.uximage')}, imgUrl=${@environment.getProperty('upload.image.view')}">
|
|
|
<!-- ★ 컨텐츠 시작 -->
|
|
|
-<script src="//developers.kakao.com/sdk/js/kakao.min.js"></script>
|
|
|
+
|
|
|
<section class="pd_detail">
|
|
|
<!-- 210409_ 구조변경 : .pd_info, .pd_info1 추가 -->
|
|
|
<div class="pd_info">
|
|
|
@@ -52,7 +52,53 @@
|
|
|
<div class="swiper-slide">
|
|
|
<div class="movbox">
|
|
|
<th:block th:if="${goodsVideo.videoGb == 'Y'}">
|
|
|
- <iframe width="100%" height="100%" th:src="${'https://www.youtube.com/embed/'+goodsVideo.kmcKey+'?rel=0&autoplay=1&mute=1'}" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
|
|
+ <!-- <iframe width="100%" height="100%" th:src="${'https://www.youtube.com/embed/'+goodsVideo.kmcKey+'?rel=0&autoplay=1&mute=1'}" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> -->
|
|
|
+ <div id="utbplayer"></div>
|
|
|
+<script src="https://www.youtube.com/iframe_api"></script><!-- 아래 원문에서 복잡하게 기술되었던 부분 -->
|
|
|
+<script th:inline="javascript">
|
|
|
+/*<![CDATA[*/
|
|
|
+ var player;
|
|
|
+
|
|
|
+ function onYouTubeIframeAPIReady(){
|
|
|
+
|
|
|
+ player = new YT.Player('utbplayer',{
|
|
|
+
|
|
|
+ width:'100%',
|
|
|
+
|
|
|
+ videoId:[[${goodsVideo.kmcKey}]],
|
|
|
+
|
|
|
+ playerVars:{'autoplay':1,'playsinline':1},
|
|
|
+
|
|
|
+ events:{ 'onReady':onPlayerReady,
|
|
|
+ 'onStateChange': onPlayerStateChange
|
|
|
+ }
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ function onPlayerReady(e){
|
|
|
+
|
|
|
+ e.target.mute();
|
|
|
+
|
|
|
+ e.target.playVideo();
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ var done = false;
|
|
|
+ function onPlayerStateChange(event) {
|
|
|
+ if (event.data == YT.PlayerState.PLAYING && !done) {
|
|
|
+ setTimeout(stopVideo, 6000);
|
|
|
+ done = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ function stopVideo() {
|
|
|
+ player.stopVideo();
|
|
|
+ }
|
|
|
+/*]]>*/
|
|
|
+</script>
|
|
|
+
|
|
|
+
|
|
|
</th:block>
|
|
|
<th:block th:unless="${goodsVideo.videoGb == 'Y'}">
|
|
|
<iframe id="child" class="pd_mov" width="100%" height="100%" th:src="${kollusMediaUrl+'/'+goodsVideo.kmcKey +'?enable_initialize_focus=false&autoplay&mute&controls_activation=none'}" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
|
|
@@ -203,7 +249,7 @@
|
|
|
<div class="item_prod">
|
|
|
<div class="item_state">
|
|
|
<button type="button" class="itemLike" th:classappend="${goodsInfo.wishYn == 'Y'}? 'likeit active' : ''" onclick="cfnPutWishList(this);" th:attr="goodsCd=${goodsInfo.goodsCd}, ithrCd=${params.ithrCd}, contentsLoc=${params.contentsLoc}, planDtlSq=''">관심상품 추가</button>
|
|
|
- <a href="javascript:void(0);" onclick="cfnGoToGoodsDetail([[${goodsInfo.goodsCd}]], '',[[${params.ithrCd}]],'[[${params.contentsLoc}]]','','pc_detail');" class="itemLink" >
|
|
|
+ <a href="javascript:void(0);" th:onclick="cfnGoToGoodsDetail([[${goodsInfo.goodsCd}]], '',[[${params.ithrCd}]],'[[${params.contentsLoc}]]','','pc_detail');" class="itemLink" >
|
|
|
<div class="itemPic">
|
|
|
<img alt="" class="vLHTC pd_img" th:src="${imgGoodsUrl+'/'+goodsInfo.sysImgNm+'?RS=156'}" th:onerror="'this.src=\''+@{${uxImgUrl}+ '/images/pc/thumb/bg_item_none.png'}+'\';'">
|
|
|
</div>
|
|
|
@@ -1089,15 +1135,6 @@
|
|
|
<a href="javascript:void(0);" id="btn_close_itemThumbPop" onclick="cfCloseLayer('pdItemThumbPop')">닫기버튼</a>
|
|
|
</div>
|
|
|
<div class="full_pop_container">
|
|
|
- <div id="popThumb1" class="scaleview">
|
|
|
- <video id="video_0" loop="" autoplay="" poster="https://images.kolonmall.com/Prod_Img/JN/2021/LM15/L4PAM21041GRX_LM15.jpg" data-playing="">
|
|
|
- <source src="https://images.kolonmall.com/Prod_Img/product_video/L4PAM21041GRX.mp4" type="video/mp4">
|
|
|
- </video>
|
|
|
- <div class="video_controls">
|
|
|
- <button type="button" class="btn_video_play"><span>play</span></button>
|
|
|
- <button type="button"class="btn_video_pause"><span>pause</span></button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
<th:block th:each="goodsImg, status : ${goodsImgList}">
|
|
|
<div id="popThumb2" class="scaleview" th:if="${ not (#strings.contains(goodsImg.sysImgNm,'_F1.')
|
|
|
or #strings.contains(goodsImg.sysImgNm,'_L1.')
|
|
|
@@ -1223,7 +1260,6 @@
|
|
|
let addPrice = $target.attr("addPrice");
|
|
|
let selfGoodsYn = $target.attr("selfGoodsYn");
|
|
|
let optQty = minOrdQty;
|
|
|
- let maxCnt = maxOrdQty;
|
|
|
|
|
|
let params = new Object();
|
|
|
params.goodsCd = goodsCd;
|
|
|
@@ -1247,8 +1283,8 @@
|
|
|
$.get("/goods/detail/ajaxGoodsStockQty", $.param(params), function(result) {
|
|
|
let itemCnt = eval(result); //해당 아이템에 선택되어진 사이즈의 수량
|
|
|
|
|
|
- if (maxCnt > itemCnt) {
|
|
|
- maxCnt = itemCnt;
|
|
|
+ if (maxOrdQty > itemCnt) {
|
|
|
+ maxOrdQty = itemCnt;
|
|
|
}
|
|
|
|
|
|
if (minOrdQty > itemCnt) {
|
|
|
@@ -1268,7 +1304,7 @@
|
|
|
tag += ' </div>\n';
|
|
|
tag += ' <div class="number_count">\n';
|
|
|
tag += ' <span class="minus min_val" onclick="fnAdjustOrderEa(this);" adjust="-"><em class="sr-only">감소</em></span>\n';
|
|
|
- tag += ' <input type="text" name="cea" optCd="'+optCd+'" maxlength="3" style="ime-mode:disabled" value="' +optQty+'" readonly>\n';
|
|
|
+ tag += ' <input type="text" name="cea" optCd="'+optCd+'" maxlength="3" style="ime-mode:disabled" value="' +optQty+'" readonly minOrdQty="'+minOrdQty+'" maxOrdQty="'+maxOrdQty+'">\n';
|
|
|
tag += ' <input type="hidden" name="coption" value="'+optCd+'" goodsCd="'+goodsCd+'" price="'+currPrice+'" addPrice="'+addPrice+'">\n';
|
|
|
tag += ' <span class="plus" onclick="fnAdjustOrderEa(this);" adjust="+"><em class="sr-only">추가</em></span>\n';
|
|
|
tag += ' </div>\n';
|
|
|
@@ -1280,7 +1316,7 @@
|
|
|
|
|
|
|
|
|
let $objUp = $('.pd_detail .opt_result');
|
|
|
- $objUp.append(tag);
|
|
|
+ $objUp.prepend(tag);
|
|
|
fnSetTotalPrice();
|
|
|
|
|
|
$('.pop_option_select').css("display", "none");
|
|
|
@@ -1353,11 +1389,10 @@
|
|
|
|
|
|
if (targetSize == itemSize){
|
|
|
|
|
|
- let maxCnt = maxOrdQty;
|
|
|
let optQty = minOrdQty;
|
|
|
let data = {arrGoodsOption : goodsOption
|
|
|
- ,minOrdQty : minOrdQty
|
|
|
- ,maxOrdQty : maxOrdQty
|
|
|
+ ,minOrdQty : $("#cartForm input[name=minOrdQty]").val()
|
|
|
+ ,maxOrdQty : $("#cartForm input[name=maxOrdQty]").val()
|
|
|
,goodsCd : mGoodsCd
|
|
|
,selfGoodsYn : selfGoodsYn
|
|
|
};
|
|
|
@@ -1365,8 +1400,8 @@
|
|
|
|
|
|
gagajf.ajaxJsonSubmit('/goods/detail/ajaxGoodsSetStockQty', jsonData, function(result) {
|
|
|
var itemCnt = eval(result); //해당 아이템에 선택되어진 사이즈의 수량
|
|
|
- if (maxCnt > itemCnt) {
|
|
|
- maxCnt = itemCnt;
|
|
|
+ if (maxOrdQty > itemCnt) {
|
|
|
+ maxOrdQty = itemCnt;
|
|
|
}
|
|
|
|
|
|
if (minOrdQty > itemCnt) {
|
|
|
@@ -1402,7 +1437,7 @@
|
|
|
tag += ' </div>\n';
|
|
|
tag += ' <div class="number_count">\n';
|
|
|
tag += ' <span class="minus min_val" onclick="fnAdjustOrderEa(this);" adjust="-"><em class="sr-only">감소</em></span>\n';
|
|
|
- tag += ' <input type="text" name="cea" optCd="'+resultOptCd+'" maxlength="3" style="ime-mode:disabled" value="' +optQty+'" readonly>\n';
|
|
|
+ tag += ' <input type="text" name="cea" optCd="'+resultOptCd+'" maxlength="3" style="ime-mode:disabled" value="' +optQty+'" readonly minOrdQty="'+minOrdQty+'" maxOrdQty="'+maxOrdQty+'">\n';
|
|
|
tag += ' <input type="hidden" name="coption" value="'+resultOptCd+'" goodsCd="'+goodsCd+'" price="'+currPrice+'" addPrice="'+addPrice+'">\n';
|
|
|
tag += ' <span class="plus" onclick="fnAdjustOrderEa(this);" adjust="+"><em class="sr-only">추가</em></span>\n';
|
|
|
tag += ' </div>\n';
|
|
|
@@ -1416,7 +1451,7 @@
|
|
|
let $objUp = null;
|
|
|
$objUp = $('.pd_detail .opt_result');
|
|
|
|
|
|
- $objUp.append(tag);
|
|
|
+ $objUp.prepend(tag);
|
|
|
|
|
|
fnSetTotalPrice();
|
|
|
|
|
|
@@ -1636,11 +1671,9 @@
|
|
|
}else{
|
|
|
tag += '<li aria-disabled="'+disabledYn+'" data-soldout="'+soldoutYn +'" onclick="fnViewStockSelfNo(this)">\n';
|
|
|
}
|
|
|
- tag += item.optCd2;
|
|
|
+ tag += '<div class="opt_name">'+ item.optCd2+'</div>\n';
|
|
|
if (item.addPrice > 0){
|
|
|
- tag += ' (+'+ item.addPrice.addComma() +'원)\n';
|
|
|
- }else{
|
|
|
-
|
|
|
+ tag += '<div class="opt_price">+'+ item.addPrice.addComma() +'원</div>\n';
|
|
|
}
|
|
|
tag += '<input type="hidden" name="opt2" value="'+ item.goodsCd+'|'+item.optCd +'|'+qty +'" goodsCd="'+item.goodsCd+'" currPrice="'+ item.currPrice +'" addPrice="'+item.addPrice+'" optCd="'+item.optCd+'" optCd1="'+item.optCd1+'" optCd1Nm="'+item.optCd1Nm+'" optCd2="'+item.optCd2+'" minOrdQty="'+minOrdQty+'" maxOrdQty="'+maxOrdQty+'" selfGoodsYn="'+selfGoodsYn+'"/>\n';
|
|
|
tag += '</li>\n';
|
|
|
@@ -1655,7 +1688,7 @@
|
|
|
}
|
|
|
|
|
|
// $obj.append(tag);
|
|
|
- $('#form_field2_'+ goodsCd).append(tag);
|
|
|
+ $('#form_field2_'+ goodsCd).prepend(tag);
|
|
|
if (selfGoodsYn == "Y"){
|
|
|
if (ridx == 1){
|
|
|
var opt_selecter02_1 = new sCombo('.pop_option_select .select_custom.item_opt2.item_opt2_1');
|
|
|
@@ -1716,7 +1749,7 @@
|
|
|
//var maxOrdQty = $("#cartForm input[name=maxOrdQty]").val();
|
|
|
|
|
|
//if (maxOrdQty && ea > maxOrdQty) ea = maxOrdQty;
|
|
|
- if (ea.toString().length > maxOrdQty) --ea;
|
|
|
+ //if (ea.toString().length > maxOrdQty) --ea;
|
|
|
if (ea < 1) ea = minOrdQty;
|
|
|
|
|
|
$target.val(ea);
|
|
|
@@ -1800,6 +1833,7 @@
|
|
|
let totalEa = 0;
|
|
|
let totalPrice = 0;
|
|
|
|
|
|
+
|
|
|
$('input[name="cea"]').each(function() {
|
|
|
let ea = parseInt($(this).val());
|
|
|
let addPrice = 0;
|
|
|
@@ -1813,12 +1847,8 @@
|
|
|
});
|
|
|
}else{
|
|
|
|
|
|
- let target=$('.select_custom.item_opt2');
|
|
|
- target.each(function() {
|
|
|
- if (typeof ($(this).find('input[name=opt2]').val()) != 'undefined' && !gagajf.isNull($(this).find('input[name=opt2]').val())){
|
|
|
- addPrice += Number($(this).find('input[name=opt2]').attr('addPrice'));
|
|
|
- }
|
|
|
- });
|
|
|
+ addPrice = parseInt($(this).parent().find('input[name="coption"]').attr('addprice'));
|
|
|
+
|
|
|
}
|
|
|
let goodsPrice = parseInt($(this).parent().find('input[name="coption"]').attr('price'));
|
|
|
|
|
|
@@ -1826,6 +1856,7 @@
|
|
|
if (goodsPrice > 0) {
|
|
|
totalPrice += ((goodsPrice+addPrice) * ea);
|
|
|
}
|
|
|
+
|
|
|
});
|
|
|
|
|
|
$('#goodsTotalQty').html(totalEa.addComma());
|
|
|
@@ -2263,52 +2294,51 @@
|
|
|
},
|
|
|
});
|
|
|
|
|
|
- var bestCount = 0;
|
|
|
+ var qnaCount = 0;
|
|
|
//팝업 - 상품문의 리스트
|
|
|
$(document).on('click','#btn_pdQnaList_pop',function(e){
|
|
|
- bestCount = 1;
|
|
|
+ qnaCount = 1;
|
|
|
return false;
|
|
|
});
|
|
|
|
|
|
//팝업 - 상품문의 작성
|
|
|
$(document).on('click','#btn_pdQnaWrite_pop',function(e){
|
|
|
- bestCount = 2;
|
|
|
+ qnaCount = 2;
|
|
|
return false;
|
|
|
});
|
|
|
$(document).on('click','.pd_qnawrite_pop .close-modal',function(e){
|
|
|
- if(bestCount === 2){
|
|
|
+ if(qnaCount === 2){
|
|
|
$('#layer_goods_qna').modal('show');
|
|
|
setTimeout(fnGoodsQnaList, 100);
|
|
|
- bestCount = 1;
|
|
|
+ qnaCount = 1;
|
|
|
}
|
|
|
return false;
|
|
|
});
|
|
|
|
|
|
- $(document).on('click','.pd_detail .thumb_box',function(e){
|
|
|
- $('#pdItemThumbPop').css("display", "block");
|
|
|
+ $(document).on('click','.pd_detail .thumb_box .thumb',function(e){
|
|
|
+ $('#pdItemThumbPop').css("display", "block");
|
|
|
return false;
|
|
|
- })
|
|
|
-
|
|
|
- $(document).on('click','.pd_bestreviewdetail_pop .thumblist ul li',function(e){
|
|
|
+ })
|
|
|
|
|
|
- $(this).parents(".swiper-slide").find(".review > .pic > .thumb").empty();
|
|
|
- $(this).parents(".swiper-slide").find(".thumblist ul li .pic").removeClass('active');
|
|
|
- $(this).find(".pic").addClass('active');
|
|
|
-
|
|
|
- var thumbIndex = $(this).index();
|
|
|
- var thumbImg = $(this).find('.pic .thumb').attr('style');
|
|
|
- var thumbImgSrc = thumbImg.split("background-image:url(")[1];
|
|
|
- thumbImgHtml = "<img src="+ thumbImgSrc +" alt=''>";
|
|
|
- $(this).parents(".swiper-slide").find(".review > .pic > .thumb").append(thumbImgHtml);
|
|
|
-
|
|
|
- return false;
|
|
|
- });
|
|
|
+
|
|
|
|
|
|
// 포토,베스트리뷰숨김
|
|
|
var review_open=$(".btn_review_open");
|
|
|
- $(document).on('click','.btn_review_open',function(e){
|
|
|
+ //$(document).on('click','.btn_review_open',function(e){
|
|
|
+ // $(this).toggleClass('active');
|
|
|
+ // $(this).next(".review_list").toggleClass('active');
|
|
|
+ // return false;
|
|
|
+ //});
|
|
|
+ $(document).on('click','.pd_review .btn_review_open',function(e){
|
|
|
$(this).toggleClass('active');
|
|
|
$(this).next(".review_list").toggleClass('active');
|
|
|
+ if($(this).hasClass('active')){
|
|
|
+ $(".pd_review.best").css("position", "absolute");
|
|
|
+ //$(".pd_review.best").css("bottom", "0");
|
|
|
+ } else {
|
|
|
+ $(".pd_review.best").css("position", "relative");
|
|
|
+ //$(".pd_review.best").css("bottom", "auto");
|
|
|
+ }
|
|
|
return false;
|
|
|
});
|
|
|
|
|
|
@@ -2428,9 +2458,52 @@
|
|
|
$("body").removeClass("recoPop");
|
|
|
return false;
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
+ /* $(document).on('click','.pop_open_btn',function(){
|
|
|
+ $('.modal.photo_comment_popup .pop_detail').toggleClass('active');
|
|
|
+ }); */
|
|
|
+
|
|
|
});
|
|
|
|
|
|
+
|
|
|
+ //pd전용 - 썸네일/헤더 블라인드 생성 : 210520_ 추가
|
|
|
+ $('.pd .thumb_box .thumb_list .swiper-slide').prepend('<span></span>');
|
|
|
+ // pd전용 - 스크롤 스크립트
|
|
|
+ $(window).scroll(function(){
|
|
|
+ var lastScrollTop = 0;
|
|
|
+ var st = $(this).scrollTop();
|
|
|
+ if($('header').hasClass("main") !== true){
|
|
|
+ if (st > lastScrollTop){
|
|
|
+ $(".app .gnb").css("position", "fixed");
|
|
|
+ $(".htop").css("background", "#fff");
|
|
|
+ $(".app .gnb .btn-expand").css("position", "fixed");
|
|
|
+ $(".tabbar").removeClass("fixed");
|
|
|
+ $(".thumb_list .swiper-slide span").animate({"opacity": 0}, 30);
|
|
|
+ } else {
|
|
|
+ $(".app .gnb").css("position", "fixed");
|
|
|
+ $(".htop").css("background", "#fff");
|
|
|
+ $(".app .gnb .btn-expand").css("position", "fixed");
|
|
|
+ $(".tabbar").addClass("fixed");
|
|
|
+ $(".thumb_list .swiper-slide span").animate({"opacity": 0.5}, 30);
|
|
|
+ setTimeout(function(){
|
|
|
+ if($(window).scrollTop() === 0){
|
|
|
+ $(".app .gnb").css("position", "relative");
|
|
|
+ $(".app .gnb .btn-expand").css("position", "absolute");
|
|
|
+ }
|
|
|
+ },300)
|
|
|
+ }
|
|
|
+ if(st < 10) {
|
|
|
+ $(".htop").css("background", "transparent");
|
|
|
+ $(".thumb_list .swiper-slide span").animate({"opacity": 0.5}, 0);
|
|
|
+ }
|
|
|
+ lastScrollTop = st;
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+ let vh = window.innerHeight * 0.01;
|
|
|
+ document.documentElement.style.setProperty('--vh', `${vh}px`);
|
|
|
+
|
|
|
// 상품상세 asis html 이지미 경로 수정
|
|
|
window.onload = function(){
|
|
|
$(".pd_descrp .cont_body").find('img').each(function() {
|
|
|
@@ -2441,21 +2514,17 @@
|
|
|
|
|
|
});
|
|
|
|
|
|
- /*
|
|
|
- let goodsVideoList = [[${goodsVideoList}]];
|
|
|
+ let goodsVideoList = [[${goodsVideoList}]];
|
|
|
let videoFlag = false;
|
|
|
if (goodsVideoList != null){
|
|
|
-
|
|
|
$.each(goodsVideoList, function(idx, goodsVideo) {
|
|
|
if ("M" == goodsVideo.videoGb){
|
|
|
videoFlag = true;
|
|
|
return false;
|
|
|
}
|
|
|
-
|
|
|
});
|
|
|
- }
|
|
|
-
|
|
|
- if (videoFlag){
|
|
|
+ }
|
|
|
+ if (videoFlag){
|
|
|
try {
|
|
|
var controller = new VgControllerClient({
|
|
|
target_window: document.getElementById('child').contentWindow
|
|
|
@@ -2472,30 +2541,28 @@
|
|
|
controller.play();
|
|
|
controller.set_control_visibility(false);
|
|
|
|
|
|
- } */
|
|
|
-
|
|
|
- /* $(window).scroll(function(){
|
|
|
- var scrollTop= $(window).scrollTop();
|
|
|
- var itemTop=$('.descript_box').offset().top;
|
|
|
- var winHeight = $(window).height();
|
|
|
- console.log(winHeight-scrollTop);
|
|
|
- console.log(winHeight/1.5);
|
|
|
- if (winHeight-scrollTop <= winHeight/1.5){
|
|
|
- controller.pause();
|
|
|
- } else {
|
|
|
- controller.play();
|
|
|
- controller.set_control_visibility(false);
|
|
|
- }
|
|
|
-
|
|
|
- controller.on('done', function() {
|
|
|
- controller.play();
|
|
|
- controller.set_control_visibility(false);
|
|
|
- });
|
|
|
- }); */
|
|
|
-
|
|
|
- $(document).on('click','.pop_open_btn',function(){
|
|
|
- $('.modal.photo_comment_popup .pop_detail').toggleClass('active');
|
|
|
- });
|
|
|
+ $(window).scroll(function(){
|
|
|
+ var scrollTop= $(window).scrollTop();
|
|
|
+ var itemTop=$('.descript_box').offset().top;
|
|
|
+ var winHeight = $(window).height();
|
|
|
+ //console.log(winHeight-scrollTop);
|
|
|
+ //console.log(winHeight/1.5);
|
|
|
+ if (winHeight-scrollTop <= winHeight/1.5){
|
|
|
+ controller.pause();
|
|
|
+ } else {
|
|
|
+ controller.play();
|
|
|
+ controller.set_control_visibility(false);
|
|
|
+ }
|
|
|
+
|
|
|
+ controller.on('done', function() {
|
|
|
+ controller.play();
|
|
|
+ controller.set_control_visibility(false);
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
|
|
|
};
|
|
|
|