테스트 사이트 - 개발 중인 베타 버전입니다

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

당근이좋니 4년 전 조회 3,227

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

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

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

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

 

$(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개

채택된 답변
+20 포인트
e
4년 전

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

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

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

 

css 적용하려면

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

define('G5_CSS_VER', '210331');

로그인 후 평가할 수 있습니다

답변에 대한 댓글 2개

당근이좋니
4년 전
$(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());

});


-------------------------------------------------
요렇게 했더니 그냥 스크롤시 나오기는 하는데 깜빡깜빡거리는데요
혹시 깜빡거리지 않게 하려면 어디를 손봐야 하는지.... ㅠㅠ
e
eyekiss
4년 전
스크립트는 수정하지 말고.. 제가 알려드린 부분만 수정하면 됩니다.

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인