2009-05-28 2 views

답변

2

어떻게 할 수 있습니다. 심지어 당신이 수평 스크롤이있는 경우 작동합니다

$(function(){ 
    $("#grid1").scroll(function(){ 
     $("#grid2") 
      .attr('scrollTop', $(this).attr('scrollTop')) 
      .attr('scrollLeft', $(this).attr('scrollLeft')); 
    }); 
}); 

이 코드는 "GRID1"와 "GRID2는"테이블이 각각 포함 된 div의의 ID를 가정합니다.

+0

매우 부드럽습니다. – dotnetcoder

관련 문제