百度百科右侧导航目录
包括 side-toolbar.js 和 side-catalog.js 两个插件。
side-toolbar.js 主要负责 toolbar 的定位。
side-catalog.js 主要负责内容和目录的定位。
##Demo Demo
1.Include stylesheet.
<link rel="stylesheet" type="text/css" href="side-toolbar.css">
<link rel="stylesheet" type="text/css" href="side-catalog.css">
2.Include jQuery and side-toolbar.js, side-catalog.js.
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="side-toolbar.js"></script>
<script type="text/javascript" src="side-catalog.js"></script>
3.Create a HTML tag to hold the toolbar and catalog.
<div id="sideToolbar">
<div id="sideCatalog"></div>
</div>
4.Create toolbar and catalog.
$('#sideToolbar').sideToolbar({width: 220, height: 320, showHeight: 300});
$('#sideCatalog').sideCatalog({width: 200, height: 220, content: '#content'});
Feel free to use, share and fork.
Enjoy!