var tree = SentenceTree.getInstance(); var inst = $.jstree.reference(data.reference); tree.get_selected(); tree.get_node(nodeid); tree.get_children(node); tree.get_path(id, false, true); // path ids as array tree.delete_node(node); tree.delete_node(node); tree.select_node(node, true, false); // supress_event tree.is_selected(obj) tree.deselect_all(); tree.refresh(true, false) $(this.ele).jstree(true).get_json('#', {flat:false, no_state:true}); //open Tree.tree.jstree('open_node', id, function(){ Tree.tree.jstree('select_node', selected_id, true, false); // select_node without event trigger }); // load Tree.tree.jstree('load_node', id, function(){ //open Tree.tree.jstree('open_node', id, function(){ // select node. events nicht auslösen Tree.tree.jstree('select_node', id, true, false); }); }); // create tree.create_node(node, { 'type':'placeholder', 'text': v }, "last", function (new_node) { //// setTimeout(function () { //// //new_node.text = SentenceBuilder.wording.new_placeholder; //// inst.edit(new_node); //// }, 0); });
destroy
Debug
$('#tree1').jstree('destroy', '#tree1'); console.log($.jstree);
Contextmenu
// Contextmenü ausblenden $('.vakata-context').hide();
Event Handler
this.tree.on('dblclick.jstree', function(event){ that.onNodeDblClick(event); }); this.tree.on('changed.jstree', function(e, data){ console.log('data', data); switch(data.action){ case 'select_node': that.onNodeSelect(e, data) ; break; case 'deselect_all': that.onNodeDeselectAll(e, data); break; default: console.log('onNodeChanged with action', data.action, data.selected); break; } }); this.tree.on('copy_node.jstree', function(e, data){ that.onNodeCopy(e, data); }); this.tree.on('create_node.jstree', function(e, data){ that.onNodeCreate(e, data); }); this.tree.on('move_node.jstree', function(e, data){ that.onNodeMove(e, data); }); this.tree.on('rename_node.jstree', function(e, data){ that.onNodeRename(e, data); }); this.tree.on('delete_node.jstree', function(e, data){ that.onNodeDelete(e, data); }); this.tree.on('contextmenu.jstree', function(e, data){ console.log('contextmenu.jstree') }); $(document).on('context_show.vakata', function(e, data){ console.log('context_show.vakata') }); $(document).on('context_hide.vakata', function(e, data){ console.log('context_hide.vakata') });
Folgende Artikel könnten auch interessieren
- Webseiten GZip komprimiert ausliefern
- Visualisierung von Baumstrukturen
- Trigonometrie mit Javascript
- Top Web UI Frameworks mit HTML5, CSS und Javascript
- Top jQuery UI Libraries
- Top Javascript Komponenten
- Testartikel 1 Lorem ipsum
- Streaming mit dem Soundmanager2 von schillmania.com
- Shopware ExtJs Dokumentationen und Hilfen
- Pure Javascript
- Musik und Javascript = Aufnehmen, Frequenzanalyse, Visualisierung, WAV, MP3
- Multi User Lösungen mit Javascript
- layout.js Codesnippets
- JSON Schema und JSON Data und was man damit anfangen kann
- JSON Schema Cheat Sheet
- jQuery map() Methode
- joint.js Javascript
- Javascript Tutorials und Referenzen
- Javascript Techniken und Methoden
- Javascript Plugins