I5ting ztree toc

i5ting_ztree_toc is a toc using ztree

View the Project on GitHub i5ting/i5ting_ztree_toc

Welcome to GitHub Pages.

大家是否为markdown没办法生成toc(Table of Content)而苦恼?

i5ting_ztree_toc是一个解决上面问题的jQuery插件,可以根据h1到h6自动生成toc,并且可以自动编号

Usage

Add this line to your html file:

<script src="js/jquery-1.4.4.min.js"></script>
<script src="js/jquery.ztree.core-3.5.js"></script>
<script src="ztree_toc.js"></script>
		

Add this line to your html file:

 <link rel="stylesheet" href="zTreeStyle.css" type="text/css">
		

And then execute:

<script type="text/javascript" >
<!--
$(document).ready(function(){
    $('#tree').ztree_toc({

    });
});
//-->
</script>
		

Example

$(document).ready(function(){
    $('#tree').ztree_toc({
        is_auto_number: true,
        // documment_selector: '.first_part'
    });
});
		

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

版本历史

License

this project is released under the MIT License.