Jstree advanced use, get all selected values and all selected parent node values

Source: Internet
Author: User

varTree = $ ("#jstree"). Jstree ({"Core": {            "Themes": {"responsive":false },            "Check_callback":true,           ' data ': {' URL ': function (node) {return '/test/jstreejson ';}, ' Data ': function (node) {return {' Parent ': 1000}; } }        },        "Types": {            "Default": {"icon": "FA fa-folder icon-state-warning icon-lg" },            "File": {"icon": "FA fa-file icon-state-warning icon-lg" }        },        //"state": {"key": "Demo3"},' Plugins ': ["checkbox", "Types"]}). On ("Changed.jstree",function(E, data) {//Change event}). Bind ("Select_node.jstree",function(E, data) {//Check event}); Gets all selected values and gets the parent value to be selectedfunctionTTT () {varIDArray =NewArray (); $("#jstree"). Find (". jstree-checked,. jstree-undetermined"). each (function() {Idarray.push ($ ( This). Closest (' Li '). attr ("id"));        }); IDArray= Idarray.concat ($.jstree.reference ($ ("#jstree")) . get_selected ()); Alert (Idarray.join (‘,‘)); }


Do the website, do the software can findTianma website Construction http://www.tmddd.com/

Jstree advanced use, get all selected values and all selected parent node values

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.