NOTICE

게시판 상세
제목 (필수) 추가 이미지 겹침현상
작성자

마스터스킨 (ip:) 조회수 :777

작성일 2017-06-07
평점 0점
추천 추천하기



코드 변경시 백업은 필수!



1. 수정 파일 위치 : 스마트디자인편집창 - 전체화면보기 > 레이아웃/기본레이아웃/tool/css/produtct.css


/*상품상세 추가이미지*/
.xans-product-detail .imgArea .listImg ul {
	margin: 0px;
	height: auto;
}
.xans-product-detail .imgArea .listImg li {
	margin: 0px;
	vertical-align: inherit
}
.xans-product-detail .imgArea .listImg .next {
	background: url('/layout/basic/tool/img/up.png') no-repeat!important;
	background-position: 0px 0px!important;
	width: 60px;
	height: 24px;
}
.xans-product-detail .imgArea .listImg .prev {
	background: url('/layout/basic/tool/img/down.png') no-repeat!important;
	background-position: 0px 0px!important;
	width: 60px;
	height: 24px;
	bottom: 0px!important;
	top: auto!important
}





2. 수정 파일 위치 : 스마트디자인편집창 - 전체화면보기 > /js/module/product/product_image.js


/*상품상세 섬네일 롤링*/
$(document).ready(function(){
    $.fn.prdImg = function(parm){
        var index = 0;
        var target = parm.target;
        var view = parm.view;
        var listWrap = target.find('.xans-product-addimage');
        var limit = listWrap.find('> ul > li').length;
        var ul = target.find('.xans-product-addimage > ul');
        var liFirst = target.find('.xans-product-addimage > ul > li:first-child');
        var liWidth = parseInt(liFirst.width());
        var liHeight = parseInt(liFirst.height());
        var blockWidth = liWidth + parseInt(liFirst.css('marginRight')) + parseInt(liFirst.css('marginLeft'));
        var columWidth = blockWidth * view;
        var colum = Math.ceil(limit / view);

        var roll = {
            init : function(){
                function struct(){
                    var ulWidth = limit * parseInt(blockWidth);
                    listWrap.append('<button type="button" class="prev">이전</button>');
                    listWrap.append('<button type="button" class="next">다음</button>');
                    ul.css({'position':'absolute', 'left':0, 'top':0});
                    listWrap.css({'position':'relative', 'height':liHeight*8});

                    var prev = listWrap.find('.prev');
                    var next = listWrap.find('.next');

                    prev.click(function(){
                        if(index > 0){
                            index --;
                        }
                        roll.slide(index);
                    });
                    next.click(function(){
                        if(index < (colum-1) ){
                            index ++;
                        }
                        roll.slide(index);
                    });
                    if(index == 0){
                        prev.hide();
                    } else {
                        prev.show();
                    }
                    if(index >= (colum-1)){
                        next.hide();
                    } else {
                        next.show();
                    }
                }
                if(limit > view){
                    struct();
                }
            },
            slide : function(index){
                var top = '-' + (index * columWidth) +'px';
                var prev = listWrap.find('.prev');
                var next = listWrap.find('.next');
                if(index == 0){
                    prev.hide();
                } else {
                    prev.show();
                }
                if(index >= (colum-1)){
                    next.hide();
                } else {
                    next.show();
                }
                ul.stop().animate({'top':top},500);
            }
        }
        roll.init();
    };

    // 함수호출 : 상품상세 페이지
    $.fn.prdImg({
        target : $('.xans-product-image'),
        view : 8
    });

    // 함수호출 : 상품확대보기팝업
    $.fn.prdImg({
        target : $('.xans-product-zoom'),
        view : 8
    });

});





3. 첨부된 btn.zip 파일에 압축을 풀어 FTP를 이용해 아래 위치로 업로드해 주세요.

/layout/basic/tool/img/

첨부파일
비밀번호 수정 및 삭제하려면 비밀번호를 입력하세요.
목록 수정 답변
댓글 수정 비밀번호 :
0 / 200 byte

비밀번호 :

댓글 입력 댓글달기 이름 :비밀번호 : / 평점
/ byte 왼쪽의 문자를 공백없이 입력하세요.(대소문자구분)

관리자에게만 댓글 작성 권한이 있습니다.