Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/292.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php jquery表排序器滚动不工作引导模式_Php_Jquery_Twitter Bootstrap_Tablesorter - Fatal编程技术网

Php jquery表排序器滚动不工作引导模式

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'],

我在引导模式中将表显示为jquery tablesorter。它的工作很好,分类和所有。但是当添加滚动小部件时,模式变为空白,没有显示任何内容

$('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


这与php有什么关系?这与php有什么关系?
$(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();
  });
});