Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/77.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
Javascript 在引导表上使用slimscroll的正确方法是什么?_Javascript_Html_Twitter Bootstrap_Jquery Plugins_Slimscroll - Fatal编程技术网

Javascript 在引导表上使用slimscroll的正确方法是什么?

Javascript 在引导表上使用slimscroll的正确方法是什么?,javascript,html,twitter-bootstrap,jquery-plugins,slimscroll,Javascript,Html,Twitter Bootstrap,Jquery Plugins,Slimscroll,我试图在HTML表上使用slim scroll,但我根本没有得到任何滚动。以下是我尝试过的代码:- 表格代码:- <div class"container"> <div class="row"> <div class="col-md-8"> <div class="scrolltable"> <table class="table table-striped table-bordered text-center table-condens

我试图在HTML表上使用slim scroll,但我根本没有得到任何滚动。以下是我尝试过的代码:-

表格代码:-

<div class"container">
<div class="row">
<div class="col-md-8"> 
<div class="scrolltable"> 
<table class="table table-striped table-bordered text-center table-condensed"> <thead>
 <tr style="height: 83px;"> 
<th style="width: 249px; height: 83px;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; STUDENT-ID</th> 
<th style="width: 34px; height: 83px;">&nbsp;S.NO</th>
 <th style="width: 198px; height: 83px;">&nbsp; &nbsp; &nbsp; &nbsp; STUDENT NAME</th>
</tr>
</thead>
     <tbody id="bodyer">

<tr style="height: 23px;">
    <td style="width: 249px; height: 23px;">15-14-065</td>
    <td style="width: 34px; height: 23px;">1</td>
    <td style="width: 198px; height: 23px;">Anisul Islam</td>
    <td style="width: 11px; height: 23px;">L</td>
    <td style="width: 11px; height: 23px;">U</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 12px; height: 23px;">&nbsp;</td>
    <td style="width: 12px; height: 23px;">&nbsp;</td>
    <td style="width: 12px; height: 23px;">&nbsp;</td>
    <td style="width: 13px; height: 23px;">&nbsp;</td>
    <td style="width: 13px; height: 23px;">&nbsp;</td>
    </tr>

    <tr style="height: 23px;">
    <td style="width: 249px; height: 23px;">&nbsp;</td>
    <td style="width: 34px; height: 23px;">&nbsp;</td>
    <td style="width: 198px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 12px; height: 23px;">&nbsp;</td>
    <td style="width: 12px; height: 23px;">&nbsp;</td>
    <td style="width: 12px; height: 23px;">&nbsp;</td>
    <td style="width: 13px; height: 23px;">&nbsp;</td>

    <td style="width: 13px; height: 23px;">&nbsp;</td>
    </tr>
    <tr style="height: 23px;">
    <td style="width: 249px; height: 23px;">&nbsp;</td>
    <td style="width: 34px; height: 23px;">&nbsp;</td>
    <td style="width: 198px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 11px; height: 23px;">&nbsp;</td>
    <td style="width: 12px; height: 23px;">&nbsp;</td>
    <td style="width: 12px; height: 23px;">&nbsp;</td>
    <td style="width: 12px; height: 23px;">&nbsp;</td>
    <td style="width: 13px; height: 23px;">&nbsp;</td>
    <td style="width: 13px; height: 23px;">&nbsp;</td>
    </tr>
    </tbody>


    </table></div></div></div></div>

学生证
序号
学名
15-14-065
1.
异教徒伊斯兰教
L
U
我从这里读到了答案:- 但这似乎没有帮助。 下面是javascript,我试图在其中为表使用slim scroll:-

<script>
 $(function(){
    $('.scrolltable').slimScroll({
        height: '50px'
    });
});

 </script>

$(函数(){
$('.scrolltable').slimScroll({
高度:'50px'
});
});
我也试过:-

<script>
 $(function(){
    $('#bodyer').slimScroll({
        height: '50px'
    });
});

 </script>

$(函数(){
$(“#bodyer”).slimScroll({
高度:'50px'
});
});

您的脚本无法运行有两个原因:

  • 1) 您需要在“table”标记中添加以下属性:
数据切换=“表格”数据高度=“299”

这样:

<table class="table table-striped table-bordered text-center table-condensed" data-toggle="table" data-cache="false" data-height="299">
$(document).ready(function () {
  $('.fixed-table-body').slimScroll({});
});