2014-07-06 2 views
1

페이지가 아래에 도달 할 때까지 제어 된 속도로 자동 부드럽게 스크롤하려는 페이지가 있습니다. 여기JQuery : Automatic Smooth Scrolling

는 예를 http://tim.theenchanter.com/2008/08/autoscroll-in-safari-firefox.html

(안 북마크로) JQuery와 함께 할 수있는 방법이 있나요입니까? PARAMS 그 북마크로 명시 적으로하지 않습니다하지만 당신은 원하는대로 easing 유형과 durationadjust 수 있습니다 - 당신이 일정한 속도로 원하는처럼

답변

0

lmgtfy

는 소리.

그렇다면 $(document).ready에 바인딩하는 것입니다.

0

이 예제는 페이지 하단으로 스크롤하는 데 30 초가 걸립니다.

<a href="#bottom">start scrolling</a> 

<p> lots of content here </p> 

<h2 id="bottom">bottom of page</h2> 

<script> 
    var oneSecond = 1000; 

    $('a').on('click', function() { 

     $("html, body").animate({ 
      scrollTop: $(document).height() 
     }, 30 * oneSecond); 

     return false; 
    }); 
</script> 

또한 다른 예는

http://css-tricks.com/snippets/jquery/smooth-scrolling/

jQuery Scroll to bottom of page/iframe

을 볼 수 있습니다.