Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/72.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
mCustomScrollbar jquery插件_Jquery_Mcustomscrollbar - Fatal编程技术网

mCustomScrollbar jquery插件

mCustomScrollbar jquery插件,jquery,mcustomscrollbar,Jquery,Mcustomscrollbar,这是我的HTML,首先是,我使用了一个脚本,在这些div中添加了内容,该div的css属性为“溢出:auto” 一旦内容溢出,滚动条在默认情况下总是出现,它应该是我调用的脚本中的自定义滚动条 我不知道如何让它启动div的滚动条 <html> <head> <title>Admin</title> <link rel ="stylesheet" type="text/css" href="css/admin.css"/> <link

这是我的HTML,首先是
,我使用了一个脚本,在这些div中添加了
内容,该div的css属性为“
溢出:auto

一旦内容溢出,滚动条在默认情况下总是出现,它应该是我调用的脚本中的自定义滚动条

我不知道如何让它启动div的滚动条

<html>
<head>
<title>Admin</title>
<link rel ="stylesheet" type="text/css" href="css/admin.css"/>
<link rel="stylesheet" type="text/css" href="jquery.mCustomScrollbar.css"/>       

<script  src="js/jquery-1.9.1.js"></script>
<script  type="text/javascript" src="js/jquery-ui-1.10.2.custom.js"></script >
 <!--script of the plugin-->
    <script src="jquery.mCustomScrollbar.concat.min.js"></script>
<script>
(function($){
    $(window).load( function(){

        $('#tablebody').mCustomScrollbar({               
            scrollButtons:(enable:true),
            autoHideScrollbar:true

        });

    });
)}(jquery);
</script>
</head>
<body>
<div id="tablebody"> <!--css{overflow:auto}-->
   <table id="inv_data">
        <tbody id="data_content"></tbody> <!--appending <tr>-->
   </table>
</div>
</body>
</html>

管理
(函数($){
$(窗口)。加载(函数(){
$('#tablebody').mCustomScrollbar({
滚动按钮:(启用:真),
自动隐藏滚动条:true
});
});
)}(jquery);

那么
m
是在哪里定义的?很抱歉,我弄错了,这是mcustomscrollbar。您是否尝试过从$(document).ready()中调用它?是的,我尝试过,但也没有成功。您是否检查了插件的src文件路径是否正确?