У меня есть таблица с сортировкой поиска и липким заголовком таблицы. Первая проблема, с которой я столкнулся, — не получается склеить шапку с таблицей. При прокрутке он прилипает к окну. Во-вторых, я не могу изменить размер ширины и высоты таблицы. Когда я держу его внутри тега div
, липкий заголовок не работает
Пожалуйста, помогите мне, как этого добиться.
<script id="js">$(function(){
$("table").tablesorter({
widthFixed : true,
showProcessing: true,
headerTemplate : '{content} {icon}',
// Add icon for jui theme; new in v2.7!
widgets: [ 'uitheme', 'zebra', 'stickyHeaders', 'filter' ],
widgetOptions: {
// extra css class name applied to the sticky header row (tr) - changed in v2.11
stickyHeaders : '',
// adding zebra striping, using content and default styles - the ui css removes the background from default
// even and odd class names included for this demo to allow switching themes
zebra : ["ui-widget-content even", "ui-state-default odd"],
// use uitheme widget to apply defauly jquery ui (jui) class names
// see the uitheme demo for more details on how to change the class names
uitheme : 'jui'
}
});
});</script>
Это файл js для css
<script src="js/jquery.tablesorter.widgets.js"></script>