bootstrap 滑动开关bootstrap-switch无效果

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<link href="css/bootstrap.min.css" rel="stylesheet" />
<link href="css/article.css" rel="stylesheet" />
<link href="css/main.css" rel="stylesheet" />
<link href="css/titatoggle-dist-min.css" rel="stylesheet" />
<script src="js/jquery-1.9.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/bootstrap-switch.js"></script>
</head>
<body>
<div class="col-md-12 article">
<p class="asdzj col-md-2"><i class="asdb"></i>文章列表</p>
<div class="article-add">
<a><i class="i1"></i>新增标签</a>
</div>
<div class="col-md-12" id="con_click_1">
<table class="table table-bordered security">
<thead>
<tr>
<th>文章名称</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<div class="checkbox checkbox-slider--default">
<label>
<input type="checkbox" value=""><span>发布</span>
</label>
</div>

</td>
<td>
<a href="hidden_detail.html">详情</a>
<a href="hidden_detail.html">编辑</a>
<a href="hidden_detail.html">删除</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</body>
</html>
<script>
</script>
已邀请:

rew1011

赞同来自:

能用,你可能是版本的问题,去Git看。
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>bootstrap测试</title>
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap-switch/3.3.4/css/bootstrap3/bootstrap-switch.min.css" rel="stylesheet">
</head>
<body>
    <input type="checkbox" name="my-checkbox" checked>
    <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
    <script src="https://cdn.bootcss.com/bootstrap-switch/3.3.4/js/bootstrap-switch.min.js"></script>
    <script>
        $(document).ready(function(){
            $("[name='my-checkbox']").bootstrapSwitch();
        })
    </script>
</body>
</html>

要回复问题请先登录注册