|
|
@@ -138,6 +138,7 @@
|
|
|
// }
|
|
|
// });
|
|
|
// }
|
|
|
+ var bannerCloseYn = 'Y';
|
|
|
|
|
|
// GNB탭 > 카테고리
|
|
|
let fnGetGnbCategory = function(cate1) {
|
|
|
@@ -420,7 +421,7 @@
|
|
|
let tag = '';
|
|
|
|
|
|
if(item.contentsType == 'OPEN'){
|
|
|
- tag +='<div class="bnrtype_open" style="background-color:#'+item.strVar5+';">';
|
|
|
+ tag +='<div class="bnrtype_open" style="background-color:#'+item.strVar5.replaceAll('#','')+';">';
|
|
|
if(item.strVar7=='IMG'){
|
|
|
tag +=' <a href="'+item.strVar1+'" target="">';
|
|
|
tag +=' <img src="'+bannerImgUrl+''+item.imgPath1+'" alt="">';
|
|
|
@@ -449,8 +450,19 @@
|
|
|
tag+=' <button id="btn_close_bnr" class="btn_close" onclick="fnGnbTobBannerClose(1);"><span>닫기</span></button>';
|
|
|
tag+='</div>';
|
|
|
// }
|
|
|
+ if($(".open_bnr_area").text() == '열기'){
|
|
|
+ $('.close_bnr_area').show();
|
|
|
+ }else{
|
|
|
+ if(item.strVar8=='Y'){
|
|
|
+ $('.close_bnr_area').show();
|
|
|
+ bannerCloseYn = 'Y';
|
|
|
+ }else{
|
|
|
+ $('.close_bnr_area').hide();
|
|
|
+ bannerCloseYn = 'N';
|
|
|
+ }
|
|
|
+ }
|
|
|
}else if(item.contentsType == 'IMG'){
|
|
|
- tag+='<div class="bnrtype_img" style="background-color:#'+item.strVar5+';">';
|
|
|
+ tag+='<div class="bnrtype_img" style="background-color:#'+item.strVar5.replaceAll('#','')+';">';
|
|
|
tag+=' <a href="'+item.strVar1+'" target="">';
|
|
|
tag+=' <img src="'+bannerImgUrl+''+item.imgPath1+'" alt=""/>';
|
|
|
tag+=' </a>';
|
|
|
@@ -568,7 +580,16 @@
|
|
|
$('body').toggleClass('lock');
|
|
|
$('.bnrtype_open').toggleClass('fixed');
|
|
|
$(this).text($(this).text() == '열기' ? '닫기' : '열기');
|
|
|
- $(this).text() == '열기' ? $('.close_bnr_area').show() : $('.close_bnr_area').hide();
|
|
|
+ // $(this).text() == '열기' ? $('.close_bnr_area').show() : $('.close_bnr_area').hide();
|
|
|
+ if(bannerCloseYn == 'N'){
|
|
|
+ if($(this).text() == '열기'){
|
|
|
+ $('.close_bnr_area').show();
|
|
|
+ }else{
|
|
|
+ $('.close_bnr_area').hide();
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ $('.close_bnr_area').show();
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
// GNB toggle
|