jstree

顶级jQuery树插件

房东的猫 提交于 2020-02-17 00:03:57
jsTree JsTree是一个基于jQuery的Tree控件。支持HTML、JSON和XML等多种数据源。jsTree是所有jQuery树插件中功能最完善的。支持拖放、复制、删除、快捷键、多选、自定义节点图标、自定义右键菜单、跨页面保持状态等等。此外,它还支持主题功能,并自带有主题包。jsTree是完全免费的,遵循GNU许可。 Demo: http://www.jstree.com/demo 下载地址: http://www.jstree.com/ 文档: http://www.jstree.com/documentation Treeview Treeview是另一个好用的轻量级jQuery树插件,该插件能够将无序列表转换成可展开与收缩的Tree,支持无限制扩展及动态添加菜单项。Treeview在MIT和GPL协议下开源。 Demo: http://jquery.bassistance.de/treeview/demo/ 下载地址: http://github.com/jzaefferer/jquery-treeview 文档: http://docs.jquery.com/Plugins/Treeview DynaTree DynaTree 是一个优化的动态jQuery树查看插件,它只在需要时才创建DOM元素。支持checkbox、层级选择以及拖放功能

jsTree Get new node AFTER node is created

冷暖自知 提交于 2020-02-15 13:45:54
问题 I am attempting to obtain the text value of the newly created node AFTER the user edits the name of the new node and presses Enter. When I do this: .on('create_node.jstree', function (e, data) { var id = data.node.id; alert($('#' + id).text()); }); All I get is "New Node" in my alert. I have been scouring this site for an answer as well as perusing the API documentation on the jstree website for some time, But they provide few examples, so as a jQuery novice, it is pretty difficult for me to

JsTree load all data using ajax with parameter

和自甴很熟 提交于 2020-01-24 17:47:07
问题 I want to show data in jstree with ajax call. But anything dosen`t show. Below I will put my own code Html Code <div id="jstreeChart"></div> <button onclick="reload_chart()">Show Tree</button> And this is jquery code function reload_chart() { $(function () { $.ajax({ async: true, type: "Post", url: "/Controller/Action?id=3", dataType: "json", success: function (json) { //Bind Data Function createJSTrees(json.jsonvar); //For Refresh Chart $('#jstreeChart').jstree(true).refresh(); } }); }); }

My Ajax call isn't working - Trying to populate jstree via ajax php & mysql JSON

牧云@^-^@ 提交于 2020-01-23 09:52:49
问题 Javascript: $('#jstree1').jstree({ 'core' : { // I usually configure the plugin that handles the data first // This example uses JSON as it is most common "json_data" : { // This tree is ajax enabled - as this is most common, and maybe a bit more complex // All the options are almost the same as jQuery's AJAX (read the docs) "ajax" : { // the URL to fetch the data "type" : "POST", "url" : "./ajax/get_page_data.php", "dataType": "JSON", "contentType": "application/json;", "data": "d_id="+<?=

in IE8 using jQuery JSTree when scrolling the click handlers don't work anymore

别说谁变了你拦得住时间么 提交于 2020-01-22 16:55:08
问题 I'm using JStree to create a basic tree. In every browser this opens, closes,... fine except in IE8. I narrowed the problem down to this: When I don't scroll the page and the tree is positioned at the top of the page all clicks work fine. When I have scrolled the page (eg 20px) and then try to open the tree this doesn't work. The weird thing is that if I click 20px above the arrow to open the tree this works. The amount of pixels I need to click above the actual arrow depends on how much I've

关于jstree的使用

本小妞迷上赌 提交于 2020-01-21 09:45:52
关于jstree的使用 1.动态展示图标 先给一个展示树形结构的div < div id = 'workUnitTree' > < / div > $ ( '#workUnitTree' ) . jstree ( { 'core' : { 'data' : function ( obj , callback ) { var jsonstr = "[]" ; var jsonarray = eval ( '(' + jsonstr + ')' ) ; $ . ajax ( { type : 'get' , data : { } , async : false , url : '/getWorkUnitTreeData' , success : function ( data ) { var arrays = data ; for ( var i = 0 ; i < arrays . length ; i ++ ) { var arr = { "id" : arrays [ i ] . id , "parent" : arrays [ i ] . parent == "" ? "#" : arrays [ i ] . parent , "text" : arrays [ i ] . text , "type" : arrays [ i ] . attribute , //"state"

Can I specify dataType in jsTree ajax call?

非 Y 不嫁゛ 提交于 2020-01-15 05:04:09
问题 I need to specify dataType: 'jsonp' when making jsTree ajax call. Can I do that? I didn't find anything in jsTree site. 回答1: Yes you can. How, its just plain dataType: "jsonp". You can specify a callback as specified in this example. This will help you understand how jquery handles jsonp. 回答2: As far I can see, jsTree manual states that ajax config object is the same as jQuery so dataType property should work just fine. 来源: https://stackoverflow.com/questions/7224928/can-i-specify-datatype-in

JSTree select_node event firing twice

纵饮孤独 提交于 2020-01-14 01:42:06
问题 There is a select_node event I created. But its firing twice when we select a node. Here as you can see the alter I set on the select_node event Which is firing twice. Also in the JStree initialisation I specified a check event. $('#div_vocabulary_tree').on('select_node.jstree', function (e, data) { alert("Select Event"); }); This is my JStree initialization code $('#div_vocabulary_tree').jstree({ plugins: ["wholerow", "checkbox", "types", "search"], "search": { "case_insensitive": true },

jsTree Hide Checkbox

删除回忆录丶 提交于 2020-01-13 08:38:46
问题 I am using the jsTree jQuery plugin to display a 5 level deep tree. I would like to not show checkboxes on the last level. Is there any way to do that in the setting or some jquery processing I can do afterwards to remove those checkboxes? I am able to disable them using they types plugin, but I really want them to not be visible. Here is an exmple of my tree "[x]" = a checkbox [x] lvl 1 [x] lvl 2 [x] lvl 3 [x] lvl 4 [x] lvl 5a [x] lvl 5b [x] lvl 5c Here is an exmple of what I want "[x]" = a

jsTree : Append child node dynamically

狂风中的少年 提交于 2020-01-04 12:39:10
问题 I am using below code while page load to generate a tree using jsTree. $('#jstree_demo_div').jstree({ 'core': { 'themes': { 'name': 'proton', 'responsive': true }, 'data': results, "check_callback" : true } }); All is working fine and results array is showing as tree.I want to add /append dynamically child nodes while clicking on few of the nodes in this static tree. Please help. 回答1: If you set the children property of a particular node to true then the node is rendered as closed, and when