-
[jquery] window scroll not workingError 2021. 3. 22. 16:52
에러
현재 스크롤 위치를 콘솔에 찍으려고 $(window).scroll 사용하였으나 반응이 없었음
해결
$(document).ready 추가
$(document).ready(function () { $("#main").on("scroll", function () { var scrollValue = $("#main").scrollTop(); console.log(scrollValue); }); });
stackoverflow.com/questions/5686629/jquery-window-scroll-event-does-not-fire-up
jQuery window scroll event does not fire up
I'm trying to implement a simple "stay inside the viewport" behaviour to a div via jquery. For that i need to bind a function to the scroll event of the window, but i can't seem to get it to fire up:
stackoverflow.com
'Error' 카테고리의 다른 글
Whitespace text nodes cannot appear as a child of <tbody> (0) 2021.04.03 Using target="_blank" without rel="noreferrer" is a security risk (0) 2021.03.24 [mysql] 테이블에 데이터 한글 입력 시 오류 (0) 2021.03.04 [mysql] (utf8mb4_general_ci,IMPLICIT) and (utf8mb4_unicode_ci,IMPLICIT) for operation '=' (0) 2021.03.04 [mysql] Access denied for user 'root'@'localhost' (0) 2021.03.04