Home

Awesome

jQuery.zTree_Toc.js

this is a jQuery plugin for preview markdown table of content

Cli tools for compile markdown to html with jquery.ztree_toc.js

<!--![](demo/4.png) ![](demo/5.png) ![](demo/1.png) ![](demo/2.png) -->

Usages

Add this line to your html file:

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

Add this line to your html file:

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

And then execute:

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

	});
});
//-->
</SCRIPT>

or use bower to install

Example

@see demo/*.html

for example:

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

Online examples

Build

npm install -g grunt-cli
grunt

console result

➜  i5ting_ztree_toc git:(master) ✗ touch build.sh
➜  i5ting_ztree_toc git:(master) ✗ grunt 
Running "qunit:files" (qunit) task
Testing test/index.html ...OK
>> 16 assertions passed (28ms)

Running "clean:files" (clean) task
Cleaning dist...OK

Running "concat:dist" (concat) task
File "dist/ztree_toc.js" created.

Running "uglify:dist" (uglify) task
File "dist/ztree_toc.min.js" created.

Done, without errors.

this plugin can be find in following ways:

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

or @see at CONTRIBUTING.md

History

@see at History.md

Checklist

Welcome fork and feedback

在issue提问或邮件shiren1118@126.com

License

this jQuery plugin is released under the MIT License.