<!doctype html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>tuxedo-menu.js-实用的jQuery侧边栏菜单插件</title>
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">
<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.5/cyborg/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.3.0/animate.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/metisMenu/2.0.2/metisMenu.min.css">
<link rel="stylesheet" href="dist/tuxedo-menu.css">
<link rel="stylesheet" type="text/css" href="css/htmleaf-demo.css">
<link rel="stylesheet" href="css/demo.css">
<!--[if IE]>
<script src="http://libs.useso.com/js/html5shiv/3.7/html5shiv.min.js"></script>
<![endif]-->
</head>
<body>
<div class='tuxedo-navbar'>
<div class="container">
<span class="tuxedo-menu-trigger">☰</span>
</div>
</div>
<main class="container">
<header class="htmleaf-header">
<h1>tuxedo-menu.js-实用的jQuery侧边栏菜单插件 <span>A simple jQuery menu plugin that is compatible with metisMenu</span></h1>
<div class="htmleaf-links">
<a class="htmleaf-icon icon-htmleaf-home-outline" href="http://www.jb51.net/" title="脚本之家" target="_blank"><span> 脚本之家</span></a>
<a class="htmleaf-icon icon-htmleaf-arrow-forward-outline" href="http://www.jb51.net/" title="返回下载页" target="_blank"><span> 返回下载页</span></a>
</div>
</header>
<div class="row">
<div id="menu-container">
<nav id="sidebar" class="tuxedo-menu metismenu">
<ul>
<li>
<h1>Heading 1</h1>
</li>
<li><a href="#">Item 1</a></li>
<li>
<h1>Heading 2</h1>
</li>
<li><a href="#">Item 2<span class="glyphicon arrow"></span></a>
<ul>
<li><a href="#">Item 2.1</a></li>
<li><a href="#">Item 2.2<span class="glyphicon arrow"></span></a>
<ul>
<li><h1>Heading 2.2.1</h1></li>
<li><a href="#">Item 2.2.1</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#">Item 3</a></li>
<li>
<h1>Heading 4</h1>
</li>
<li><a href="#">Item 4<span class="glyphicon arrow"></span></a>
<ul>
<li>
<h1>Heading 4.1</h1>
</li>
<li><a href="#">Item 4.1</a></li>
</ul>
</li>
</ul>
</nav>
</div>
<div class="col-sm-9">
<p>
This is a demo of <strong>Tuxedo Menu</strong>, a simple jQuery menu plugin, combined with <a
href="index.html" target="_blank">metisMenu <span class="fa fa-fw fa-external-link"></span></a>.
</p>
<p>
There is also a demo of <a href="index.html">Tuxedo Menu all by itself</a>.
</p>
<p>
<button class="btn btn-default" id="toggle-is-fixed">
Change menu style to <strong id="menu-style">Sidebar</strong>.
</button>
</p>
</div>
</div>
</main>
<script src="http://libs.baidu.com/jquery/2.1.1/jquery.min.js" type="text/javascript"></script>
<script>window.jQuery || document.write('<script src="js/jquery-2.1.1.min.js"><\/script>')</script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/metisMenu/2.0.2/metisMenu.min.js"></script>
<script src="dist/tuxedo-menu.min.js"></script>
<script>
(function ($) {
var isFixed = true;
$('#sidebar').tuxedoMenu({isFixed: isFixed}).metisMenu({
toggle: false,
activeClass: 'active'
});
$('#toggle-is-fixed').on('click', function () {
$('#sidebar').tuxedoMenu({isFixed: isFixed = !isFixed});
$('#menu-container').toggleClass('col-sm-3');
$('.tuxedo-menu-trigger').toggleClass('hidden');
$('#menu-style').html(isFixed ? 'Sidebar' : 'Drawer');
});
})(jQuery);
</script>
</body>
</html>