jQuery2019. 5. 1. 17:56

문서 로딩시 스크롤값 얻기

$(document).scrollTop();

 

실시간(현재) 스크롤값 얻기 (현재 스크롤값이 로깅됨)

$(window).scroll(function () {
	var scrollValue = $(document).scrollTop();
	console.log(scrollValue);
});

- 출처: euntori.blog | [제이쿼리] 현재 스크롤값 가져오기(scroll) (2016.02.05)

 

 

References :

- 즐거움을 찾자 Find Fun!! | scroll(), 스크롤 이벤트 (2012.03.06)

- 원영's | jQeury 스크롤 내리다가 특정 영역(부분) 이벤트 발생시키기 (2017.04.27)

Posted by cpu21