我有五个选项卡,其中第一个选项卡是活动选项卡。在页面加载时,当用户单击任何其他选项卡而不是第一个选项卡时,应该使用 noty 插件向用户显示错误消息,他应该“首先单击第一个选项卡'是活动选项卡。当用户单击第一个选项卡时,必须启用第二个选项卡,但不能启用第三个和第四个选项卡,类似地,当用户单击第三个选项卡时,必须启用第四个选项卡,依此类推,直到最后一个标签。
这是我的代码
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Case</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script type="text/javascript" src="jquery.noty.packaged.js"></script>
</head>
<body>
<div class="container">
<!-- Nav tabs -->
<ul id="mytabs" class="nav nav-tabs" role="tablist">
<li class="active">
<a href="#first" role="tab" data-toggle="tab">
<i class="fa fa-home"></i> First tab
</a>
</li>
<li class="disabled disabledTab second" ><a href="#second" role="tab" data-toggle="tab">
<i class="fa fa-user"></i> Second tab
</a>
</li>
<li>
<a href="#third" role="tab" data-toggle="tab">
<i class="fa fa-envelope"></i> Third tab
</a>
</li>
<li>
<a href="#fourth" role="tab" data-toggle="tab">
<i class="fa fa-envelope"></i> Fourth tab
</a>
</li>
<li>
<a href="#fourth" role="tab" data-toggle="tab">
<i class="fa fa-envelope"></i> Fifth tab
</a>
</li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane fade active in " id="first">
<h2>First tab</h2>
</div>
<div class="tab-pane fade disabled" id="second">
<a href="javascript:show_create_case_msg();">
<h2>Second tab</h2>
</div>
<div class="tab-pane fade" id="third">
<h2>Third tab</h2>
</div>
<div class="tab-pane fade" id="fourth">
<h2>Fourth tab</h2>
</div>
<div class="tab-pane fade" id="fifth">
<h2>Fifth tab</h2>
</div>
</div>
</div>
</body>
</html>