2013-08-06 2 views
1

오늘 내 문제는 실행중인 시세 표시기가 한 번만 스크롤된다는 것입니다. "makeMeScrollable"은 무한히 스크롤해야하는 텍스트를 포함하지만 말 그대로 텍스트의 끝까지 스크롤합니다. 무슨 일이 일어날 지 모르는 어떤 생각? 방화범이 더 문제SmoothDivScroll의 "실행중인 시세 표시기"는 한 번 스크롤됩니다

을 보여줍니다 여기에 내 코드입니다 :

이 머리에 :

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script> 
<script src="js/jquery-ui-1.8.23.custom.min.js"></script> 
<script src="js/jquery.mousewheel.min.js"></script> 
<script src="js/jquery.smoothdivscroll-1.3-min.js"></script> 

<script type="text/javascript"> 
    // Initialize the plugin with no custom options 
    $(document).ready(function() { 
     // None of the options are set 
     $("#makeMeScrollable").smoothDivScroll({ 
      autoScrollingMode: "always", 
      autoScrollingDirection: "endlessLoopRight", 
      autoScrollingStep: 1, 
      autoScrollingInterval: 15 
     }); 

     $("#makeMeScrollable").bind("mouseover", function() { 
      $("#makeMeScrollable").smoothDivScroll("stopAutoScrolling"); 
     }); 

     $("#makeMeScrollable").bind("mouseout", function() { 
      $("#makeMeScrollable").smoothDivScroll("startAutoScrolling"); 
     }); 
    }); 
</script> 

이 몸에 :

<div id="makeMeScrollable"> 
    <p>this contains very long text</p> 
</div> 

답변

1

내가 그것을 알아 냈어요, 또는 더 구체적으로, 나는 더 나은 독서를했다. 각각 다른 요소가 스크롤 막대만큼 길지 않으면 스왑 아웃 시간이 충분하지 않으므로 스크롤러가 멈추는 것으로 나타났습니다.

방금 ​​텍스트의 길이를 늘렸으므로 이제는 완벽하게 작동합니다.