//var leftOffset;
//var checkHeaderLeft = setInterval(function () {
//? ? var _grid = $('.ui-jqgrid');//grid div
//? ? var dataTable = $(_grid[0]).find(".ui-jqgrid-bdiv");? //數(shù)據(jù)div
//? ? var headerTable = $(_grid[0]).find(".ui-jqgrid-hbox"); //標題div
//? ? leftOffset = - dataTable.scrollLeft() + 'px';? //獲取數(shù)據(jù)div被拉動的距離
//? ? $(headerTable[0]).find("table")[0].style.left = leftOffset; //移動標題行保持和數(shù)據(jù)行對應
//? ? $($(headerTable[0]).find("table")[0]).css({"position":"relative"});
//},5);
//$(window).bind('scroll', function () {
//? ? var _grid = $('.ui-jqgrid');? // grid div
//? ? var dataTable = $(_grid[0]).find(".ui-jqgrid-bdiv");
//? ? var headerTable = $(_grid[0]).find(".ui-jqgrid-hbox");
//? ? var dataTableTop = dataTable.offset().top; //數(shù)據(jù)列到上部的距離
//? ? var dataTableHeight = dataTableTop + dataTable.outerHeight();
//? ? var windowTop = $(window).scrollTop();
//? ? var headerTablePosition = headerTable[0].style.position;
//? ? //Scroll down? ? 94的上方導航欄的高度
//? ? if (windowTop + 94 > dataTableTop - headerTable.height() && windowTop < (dataTableHeight - headerTable.height()) && headerTablePosition != "fixed") {
//? ? ? ? var width = dataTable.width() + 'px';
//? ? ? ? $(dataTable).css("top", (headerTable.height() + 1) + "px");? // +1 to account for the border width of the header
//? ? ? ? headerTable[0].style.position = "fixed";
//? ? ? ? headerTable[0].style.top = "94px";
//? ? ? ? $(headerTable[0]).css({ "z-index": 10000, "width": width, "overflow": "hidden" }); //將標題欄固定住,超出部分隱藏
//? ? ? ? $(".ui-corner-bottom").css({ "position": "relative", "top": "28px" });
//? ? ? ? var gridHeightString = $('#outsourcing-list').css("height").replace("px", "");
//? ? ? ? var newGridHeight = parseInt(gridHeightString) + headerTable.height() + 1;? // +1 to account for the border width of the header
//? ? ? ? $("#outsourcing-list").css("height", newGridHeight + "px"); //outermost grid element
//? ? }
//? ? //Scroll up
//? ? else if (windowTop + 94 < (dataTableTop - headerTable.height()) && headerTablePosition == "fixed") {
//? ? ? ? headerTable[0].style.position = "relative";
//? ? ? ? headerTable[0].style.top = "0px";
//? ? ? ? $(headerTable[0]).css({ "overflow": "initial" }); //還原標題欄之前的屬性
//? ? ? ? $(".ui-corner-bottom").css({ "position": "initial", "top": "0" });
//? ? ? ? $($(headerTable[0]).find("table")[0]).css({ "position": "initial" });
//? ? ? ? $(dataTable).css("top", "0px");
//? ? ? ? $("#outsourcing-list").css("height", "100%");? //outermost grid element
//? ? }
//});