Title: scrollTo has bug? Post by: chanedi 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); } Title: Re: scrollTo has bug? Post by: stworthy 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.
Title: Re: scrollTo has bug? Post by: chanedi 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啊 |