This gem packages the jQuery zTree plugin for easy use with the Rails asset pipleine.
- Add to the assets group in your Gemfile:
- Install the gem:
//= require ztree.core //= require ztree.excheck //= require ztree.exedit //= require ztree.exhide //= require ztree.all # include ztree.core, ztree.excheck, ztree.exedit
- Add the stylesheets to
/* *= require ztree */
$.fn.zTree.init($('#treeId'), setting, nodes);