Sha256: cd3243bad26c0ef3ca9eabb8ca28c4c0885d552cc4f51730d02565c91faee6eb
Contents?: true
Size: 1.04 KB
Versions: 7
Compression:
Stored size: 1.04 KB
Contents
$(function() { var $menu = $('#menu'); var $body = $('body'); var $h1 = $('#jqtree h1'); // title $h1.html("<span class=\"first\">jq</span><span class=\"second\">Tree</span>"); // menu $menu.affix({ offset: { top: $menu.offset().top, bottom: 0 } }); $body.scrollspy({ target: '#menu' }); var scrollspy = $body.data('bs.scrollspy'); // If no menu item is active, then activate first item if (! scrollspy.activeTarget) { scrollspy.activate('#general'); } // demo tree var data = [ { label: 'node1', id: 1, children: [ { label: 'child1', id: 2 }, { label: 'child2', id: 3 } ] }, { label: 'node2', id: 4, children: [ { label: 'child3', id: 5 } ] } ]; var $tree1 = $('#tree1'); $tree1.tree({ data: data, autoOpen: true, dragAndDrop: true }); });
Version data entries
7 entries across 7 versions & 1 rubygems