[jQuery] 스크롤 최하단 자동 포커스(auto scroll to bottom of page with jquery)

2016. 5. 20. 17:23·개발일지/2016
반응형
up vote38down voteaccepted

This will work in every case, no need to put a 'ridiculous' number in it:

$(document).scrollTop($(document).height());
shareimprove this answer
answered Dec 27 '09 at 19:43
Tatu Ulmanen
71k19131156
   
Nice and simple. – gnarf Dec 27 '09 at 19:47
2 
Doesn't work in "every" case. I tried it and it doesn't quite scroll to the bottom. It was fixed by putting a "slightly less ridiculous" number on the end, so $(document).scrollTop($(document).height()+500); – nathanchere Apr 29 '11 at 4:54
   
This appears to work at first glance, but when the element height gets to a high enough number, the scrolling stops and no longer goes to the bottom without manual intervention. The solution from Gyuri Ambrozy does not experience this issue at any element height I tested. – Daniel Nalbach Jan 21 '15 at 1:58 



[출처] http://stackoverflow.com/questions/1966784/auto-scroll-to-bottom-of-page-with-jquery

반응형
저작자표시 비영리 변경금지 (새창열림)

'개발일지 > 2016' 카테고리의 다른 글

[HTML] 모바일 디바이스별 select option text ellipsis  (0) 2016.05.25
[jQuery] element append/remove animate  (0) 2016.05.20
[HTML] 빠른 마크업을 위한 툴, EMMET  (0) 2016.05.18
[UI] Instagram NEW LOOK  (0) 2016.05.13
[jQuery] Paul gave me a tip  (0) 2016.05.09
'개발일지/2016' 카테고리의 다른 글
  • [HTML] 모바일 디바이스별 select option text ellipsis
  • [jQuery] element append/remove animate
  • [HTML] 빠른 마크업을 위한 툴, EMMET
  • [UI] Instagram NEW LOOK
zineeworld
zineeworld
2013년부터 마크업 개발을 하고 있습니다.
  • zineeworld
    zineeworld
    zineeworld
    • 전체보기 (447)
      • 지니월드 (150)
        • 회고 (8)
        • 경력 (33)
        • 경험 (39)
        • 공부 (22)
        • 수집 (27)
        • 단상 (16)
        • 장소 (5)
      • 개발일지 (297)
        • 2025 (3)
        • 2024 (9)
        • 2023 (10)
        • 2022 (1)
        • 2021 (11)
        • 2020 (29)
        • 2019 (10)
        • 2018 (21)
        • 2017 (10)
        • 2016 (91)
        • 2015 (95)
        • 2014 (7)
  • 블로그 메뉴

    • 글쓰기
    • 관리자
  • 전체
    오늘
    어제
  • 태그

    회고
    angular
    웹접근성
    css-drawing-tutorial
    SVG
    회사일기
    react
    CSS
    팀장일기
    널리
    오늘의영감
    회돈내산
    깃
    git
    디자인시스템
    css-drawing
    Mobile
    리더의착각
    zineepick
    htmlemail
  • hELLO· Designed By정상우.v4.10.2
zineeworld
[jQuery] 스크롤 최하단 자동 포커스(auto scroll to bottom of page with jquery)
상단으로

티스토리툴바