You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just for anyone else looking how to add a active and inactive class, you can use the events enabledStickiness.stickyTableHeaders and disabledStickiness.stickyTableHeaders
Fuller example:
$("table.sticky-table-headers-js").stickyTableHeaders();
$("table.sticky-table-headers-js").on('enabledStickiness.stickyTableHeaders', function () {
var $this = $(this);
$this.removeClass('tbl-sticky-inactive').addClass('tbl-sticky-active');
});
jQuery("table.sticky-table-headers-js").on('disabledStickiness.stickyTableHeaders', function () {
var $this = $(this);
$this.removeClass('tbl-sticky-active').addClass('tbl-sticky-inactive');
});
or another example:
var table = $("table.sticky-table-headers-js")
table.stickyTableHeaders();
table.on('enabledStickiness.stickyTableHeaders', function () {
var $this = $(this);
$this.removeClass('tbl-sticky-inactive').addClass('tbl-sticky-active');
});
table.on('disabledStickiness.stickyTableHeaders', function () {
var $this = $(this);
$this.removeClass('tbl-sticky-active').addClass('tbl-sticky-inactive');
});
how to toggle class for header when scroll?
The text was updated successfully, but these errors were encountered: