滚动条监听事件,定位元素位置
$ (". jqGrid_wrapper " ).scroll (function () {
var left =$ (". jqGrid_wrapper " ).scrollLeft ();//获取滚动的距离
var ths =$ (". jqGrid_wrapper table " ).eq (0 ).find ("tr" );//获取表格的所有tr
ths .each (function (i){//对每一个tr(每一行)进行处理
$ (this ).children ().eq (0 ).css ({"position" :"relative" ,"top" :"0px" ,"left" :left ,"z-index" :"1" });
$ (this ).children ().eq (1 ).css ({"position" :"relative" ,"top" :"0px" ,"left" :left ,"z-index" :"1" });
$ (this ).children ().eq (2 ).css ({"position" :"relative" ,"top" :"0px" ,"left" :left ,"z-index" :"1" });
$ (this ).children ().eq (3 ).css ({"position" :"relative" ,"top" :"0px" ,"left" :left ,"z-index" :"1" });
});
});
移动锁定行表给边框消失问题,增加如下代码
table {
border-spacing : 0 ;
border-collapse : separate ;
}
jqgrid 统计行 单元格合并
.ui-jqgrid .ui-jqgrid-ftable {
table-layout : auto ;
}
.ui-jqgrid tr .footrow td {
border : 0 ;
}