모바일 간편구매 버튼 스크립트관련 질문입니다

모바일 간편구매 버튼 스크립트관련 질문입니다

QA

모바일 간편구매 버튼 스크립트관련 질문입니다

답변 1

본문

테마를 적용하고 모바일버전에서 스크롤시 구매버튼이 나오는 부분을

구매버튼을 클릭하면 나오는 레이어 부분이 바로 스크롤시 나오게끔 하고 싶은데요

혹시 어디 부분을 수정해야 할까요 ㅠㅠ 제가 초보라서 하나도 모르겠네요

-----------소스 코드 부분입니다.-----------------------

 

$(function(){
    // Check the initial Poistion of the Sticky Header
    var stickyHeaderTop = $('#sit_ov_btn').offset().top+$('#sit_ov').height()/2;

    $(window).scroll(function(){
        if( $(window).scrollTop() > stickyHeaderTop ) {
                $('#sit_ov').addClass("fixed");
                $('#sit_ov').removeClass("static");
                $('.gg').height();
        } else {
                $('#sit_ov').removeClass("fixed");
                $('#sit_ov').addClass("static");
                
        }
    });
    
    $('.op_btn').open(function() {
        $('.scroll_show').toggle();
     });

    $(".sit_ov_height").css('height', $("#sit_ov").height());

 });

이 질문에 댓글 쓰기 :

답변 1

mobile\skin\shop\basic\style.css 파일에서 아래 빨간 부분삭제

#btn_option {display:none;position:fixed; ~~

파일은 테마와 스킨에 따라 다를 수 있습니다.

 

css 적용하려면

extend\version.extend.php 파일에 아래 빨간 부분을 수정해주세요.

define('G5_CSS_VER', '210331');

$(function(){
    // Check the initial Poistion of the Sticky Header
    var stickyHeaderTop = $('#sit_ov_btn').offset().top+$('#sit_ov').height()/2;

    $(window).scroll(function(){
        if( $(window).scrollTop() > stickyHeaderTop ) {
                $('#sit_ov').addClass("fixed");
                $('#sit_ov').removeClass("static");
                $('.gg').height();
        } else {
                $('#sit_ov').removeClass("fixed");
                $('#sit_ov').addClass("static");

        }$('.scroll_show').toggle();
    });
   
 

    $(".sit_ov_height").css('height', $("#sit_ov").height());

 });


-------------------------------------------------
요렇게 했더니 그냥 스크롤시 나오기는 하는데 깜빡깜빡거리는데요
혹시 깜빡거리지 않게 하려면 어디를 손봐야 하는지.... ㅠㅠ

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 3,166
© SIRSOFT
현재 페이지 제일 처음으로