-3
예 : 메뉴가 horisontally (머리글에 있음) 인 경우 페이지를 스크롤하면 (위> 약 100 픽셀) 메뉴 (horisontal)가 브라우저의 왼쪽으로 이동하여 (수직) 거기에 고정됩니다.Jquery 스크롤 요소?
도움이 필요하십니까?
예 : 메뉴가 horisontally (머리글에 있음) 인 경우 페이지를 스크롤하면 (위> 약 100 픽셀) 메뉴 (horisontal)가 브라우저의 왼쪽으로 이동하여 (수직) 거기에 고정됩니다.Jquery 스크롤 요소?
도움이 필요하십니까?
이 시도 :
Here is working jsFiddle 및 source을.
$(window).scroll(function() {
var headerH = $('.header').outerHeight(true);
//this will calculate header's full height, with borders, margins, paddings
var scrollTopVal = $(this).scrollTop();
if (scrollTopVal > headerH) {
$('#subnav').css({'position':'fixed','top' :'0px'});
} else {
$('#subnav').css({'position':'static','top':'0px'});
}
var scrollLeftVal = $(this).scrollLeft();
if (scrollLeftVal > 1) { alert('i scrolled to the left'); }
});
감사합니다 ... 세로 스크롤 메뉴에 수평으로 샘플을 제공 할 수 있습니까? – wawanmadda
@ user1957257 답변이 업데이트되었습니다. –