EasyUI Forum
May 05, 2024, 07:40:18 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: scrollTo has bug?  (Read 12375 times)
chanedi
Newbie
*
Posts: 2


View Profile Email
« on: May 24, 2013, 01:05:35 AM »

做了个通过上下方向键切换行的功能,然后scrollTo就不知道scroll到哪里去了...以下是我现在在用的,冻结行什么的都没考虑的

scrollTo:function(jq,index){
   // 注:未支持jq包含多个对象
   var opts = $.data(jq[0], 'datagrid').options;
   var tr = opts.finder.getTr(jq[0]);
   var height = 0;
   tr.parent().children().each(function(i) {
      if (i >= index) {
         return;
      }
      height += parseInt($(this).css("height").replace("px", ""));
   });
   $(jq[0]).scrollTop(height);
}
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: May 30, 2013, 08:27:04 PM »

The 'scrollTo' is the build-in method of datagrid since version 1.3.3. You don't need to achieve it again.
Logged
chanedi
Newbie
*
Posts: 2


View Profile Email
« Reply #2 on: June 02, 2013, 11:49:27 PM »

The 'scrollTo' is the build-in method of datagrid since version 1.3.3. You don't need to achieve it again.

我就是用的1.3.3啊。。。我想说的是1.3.3的这个方法有bug啊
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!