2
는 내가 현재 스크롤 POS를 얻을 내가 그것을 사용할 수 있도록 변수에 저장하는 방법을 잘 모르겠어요이jQuery를 저장 스크롤 위치
$('.button1').click(function() {
//grab current scroll position
var currentscrollpos = $(window).scrollTop()
$("html, body").animate({ scrollTop: 0 }, 500);
});
$('.button2').click(function() {
//go back to scroll position
$("html, body").animate({ scrollTop: currentscrollpos }, 500);
});
처럼 클릭 문장의 몇 가지있어 내 다른 클릭 기능
방법이 있습니까?