Php jquery表排序器滚动不工作引导模式
我在引导模式中将表显示为jquery tablesorter。它的工作很好,分类和所有。但是当添加滚动小部件时,模式变为空白,没有显示任何内容Php jquery表排序器滚动不工作引导模式,php,jquery,twitter-bootstrap,tablesorter,Php,Jquery,Twitter Bootstrap,Tablesorter,我在引导模式中将表显示为jquery tablesorter。它的工作很好,分类和所有。但是当添加滚动小部件时,模式变为空白,没有显示任何内容 $('table').tablesorter({ theme: 'ice', widthFixed: true, showProcessing: true, headerTemplate: '{content} {icon}', widgets: ['zebra', 'uitheme', 'scroller'],
$('table').tablesorter({
theme: 'ice',
widthFixed: true,
showProcessing: true,
headerTemplate: '{content} {icon}',
widgets: ['zebra', 'uitheme', 'scroller'],
widgetOptions: {
scroller_height: 300,
scroller_barWidth: 17,
scroller_jumpToHeader: true,
scroller_idPrefix: 's_'
}
});
确保在
中添加表格,然后比较这两个演示:
- CSS JS
中添加表格,然后比较这两个演示:
- CSS JS
$(function() {
$('#myModal').on('shown.bs.modal', function() {
$('#table0').tablesorter({
theme: 'bootstrap',
headerTemplate: '{content} {icon}', // Add icon for various themes
widgets: ['zebra', 'filter', 'uitheme', 'scroller'],
widgetOptions: {
scroller_height: 300
}
});
});
});
/* Bootstrap tweaks
adjust margin-top to accomodate for the Modal title block
adjust margin-left to tweak positioning
*/
.tablesorter-sticky-wrapper {
margin-top: -87px;
margin-left: -2px;
}
.modal-body {
overflow-x: auto;
}
$(function() {
$('#myModal').on('shown.bs.modal', function() {
$('#table0').tablesorter({
theme: 'bootstrap',
headerTemplate: '{content} {icon}', // Add icon for various themes
widgets: ['zebra', 'filter', 'uitheme', 'stickyHeaders'],
widgetOptions: {
// jQuery selector or object to attach sticky header to
stickyHeaders_attachTo: '#myModal',
stickyHeaders_offset: 0,
stickyHeaders_addCaption: true
}
});
// make sure the stickyHeader isn't showing the second
// time a modal is opened
$('#myModal').scroll();
});
});