메인 스크롤다운 로직 변경
This commit is contained in:
parent
ef73d13e47
commit
355d283004
@ -26,10 +26,10 @@ $(document).ready(function() {
|
||||
});
|
||||
|
||||
/* scroll-down function */
|
||||
$(window).on('resize', function() {
|
||||
$(window).on('resize', function() {
|
||||
//브라우저 크기 확인 실시
|
||||
var windowHeight = $(window).height(); //요소의 높이를 반환
|
||||
if(windowHeight < 440) {
|
||||
if(windowHeight < 480) {
|
||||
$('#btn-scroll').removeClass("btn-scroll-fix");
|
||||
$('#btn-scroll').addClass("btn-scroll-hide");
|
||||
}else {
|
||||
@ -48,6 +48,7 @@ $(document).ready(function() {
|
||||
|
||||
// 반드시 요소가 화면에 보여야 할경우
|
||||
return (((y + elementHeight) < (viewportHeight + scrolltop)) && (y > (scrolltop - elementHeight)));
|
||||
|
||||
};
|
||||
|
||||
$(window).on('scroll', function() {
|
||||
@ -75,20 +76,21 @@ $(document).ready(function() {
|
||||
return false;
|
||||
}
|
||||
$('#btn-scroll').attr('onclick','fn_Move('+seq+')');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
function fn_Move(seq) {
|
||||
//section 별 width 달라서 interval 처리
|
||||
var interval = 100;
|
||||
var offset = $("#sec" + seq).offset();
|
||||
if(seq > 4) interval = 250;
|
||||
$('html, body').animate({
|
||||
scrollTop: offset.top - interval
|
||||
}, 300);
|
||||
var container = $('html, body');
|
||||
var scrollTo = $("#sec" + seq);
|
||||
var position = scrollTo.offset().top - container.offset().top;
|
||||
container.animate({
|
||||
scrollTop: position
|
||||
});
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -326,7 +326,7 @@ footer .family_site {right:10px;}
|
||||
.MainSwiper .pagination {bottom: 55px;left: calc(50% - -135px);}
|
||||
|
||||
.sec1 .inner .search-wrap form .condition_sear {right: 189px;}
|
||||
.sec1 .inner .search-wrap .ark_query {width:204px;}
|
||||
.sec1 .inner .search-wrap .ark_query {width:190px;}
|
||||
|
||||
.sec1 .inner .color-box { width: 100vw; padding: 0 16px; box-sizing: border-box; top: -45px; }
|
||||
.sec1 .inner .color-box .list { height: 85px; display: flex; align-items: center; flex-direction: column-reverse; }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user