2014-03-19 2 views
0

본문에 스크롤 막대가 있습니다. 내가 다른 사업부중첩 된 사업부에서 모바일 스크롤이 작동하지 않습니다.

<body> //scrollable 
     <div> //can scroll the body 
     <div> //can not scroll the body 
     </div> 
     </div> 
    </body> 

사람이 이유를 알고 있나요에 포함 된 사업부에서 스크롤 할 때 는하지만 몸을 스크롤 할 수없는 무엇입니까?

+0

어느 쪽이 당신의 HTML/CSS 코드를 넣어하거나 문제의 JSfiddle을 만듭니다, 그것은 근처 지금까지 게시 한 어떤 문제를 이해하는 것은 불가능하다 :) – ravk

답변

0

내가이 라이브러리를 사용하여 문제를 해결할 : http://labs.rampinteractive.co.uk/touchSwipe

//scrolling issue 
    $("#myDiv").swipe({ 
     //Generic swipe handler for all directions 
     swipeStatus:function(event, phase, direction, distance, duration, fingers) { 
      var curY = window.scrollY; 
      if(direction == "up") window.scrollTo(0, curY + 10); 
      if(direction == "down") window.scrollTo(0, curY - 10) 
     }, 
     swipeUp:function(event, direction, distance, duration, fingerCount) { 
      window.scrollTo(0, distance); 
     }, 
     swipeDown: function(event, direction, distance, duration, fingerCount) { 
      window.scrollTo(0, window.scrollY - distance); 
     }, 
     threshold: 10, 
     cancelThreshold: 10 
    }); 
+0

실제로 귀하의 질문은 표시가 아니며 귀하의 답변도 귀하의 질문에 올바르게 답변하지 않습니다. :) –

관련 문제