Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* fixedColumns - Number - Default: 0
* footer - Boolean - Default: false
* cloneHeadToFoot - Boolean - Default: false
* cloneEvents - Boolean - Default: false
* autoShow - Boolean - Default: true
* altClass - String - Default: none
* themeClass - String - Default: none
Expand All @@ -22,4 +23,4 @@

If you aren't using the minified version, be sure to include
`lib/jquery.mousewheel.js` in your page if you require mousewheel
scrolling via fixed columns.
scrolling via fixed columns.
11 changes: 6 additions & 5 deletions jquery.fixedheadertable.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
autoShow: true, // hide table after its created
footer: false, // show footer
cloneHeadToFoot: false, // clone head and use as footer
cloneEvents: false, // clone events (useful if header or first row contain active elements)
autoResize: false, // resize table if its parent wrapper changes size
create: null // callback after plugin completes
};
Expand Down Expand Up @@ -135,7 +136,7 @@
.addClass(settings.originalTable.attr('class'))
.attr('style', settings.originalTable.attr('style'));

$thead.clone().appendTo($divHead.find('table'));
$thead.clone(settings.cloneEvents).appendTo($divHead.find('table'));
} else {
$divHead = $wrapper.find('div.fht-thead');
}
Expand Down Expand Up @@ -436,7 +437,7 @@
// clone header
$thead.appendTo($fixedColumn)
.find('tr')
.append($firstThChildren.clone());
.append($firstThChildren.clone(settings.cloneEvents));

$tbody.appendTo($fixedColumn)
.css({
Expand All @@ -453,7 +454,7 @@
}
}

$(this).clone()
$(this).clone(settings.cloneEvents)
.appendTo($newRow);
});

Expand Down Expand Up @@ -496,7 +497,7 @@
helpers._fixHeightWithCss($firstTdFootChild, tableProps);
$tfoot.appendTo($fixedColumn)
.find('tr')
.append($firstTdFootChild.clone());
.append($firstTdFootChild.clone(settings.cloneEvents));
// Set (view width) of $tfoot div to width of table (this accounts for footers with a colspan)
footwidth = $tfoot.find('table').innerWidth();
$tfoot.css({
Expand Down Expand Up @@ -531,7 +532,7 @@

$divFoot.empty();
$divHead.find('table')
.clone()
.clone(settings.cloneEvents)
.appendTo($divFoot);

break;
Expand Down
Loading