The following code shows how to link data-toggle.
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
src='http://code.jquery.com/jquery-1.9.1.js'></script>
<script type='text/javascript'
src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css"
href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css">
</head><!--from w w w .j av a2 s .com-->
<body>
<ul class="nav nav-list">
<li class="nav-header" data-toggle="collapse" data-target="#test">
<span> Home Click to open<span class="pull-right">X</span>
</span>
<ul class="nav nav-list collapse" id="test">
<li><a href="" title="Show list of tickets">Open Tickets</a></li>
<li><a href="" title="Edit user accounts">Accounts</a></li>
</ul>
</li>
</ul>
</body>
</html>