JQueryzTree function for loading tree menus _ jquery

Source: Internet
Author: User
This article mainly introduces the jQueryzTree function for loading tree menus, allowing you to easily design tree menus. If you are interested, refer to designing tree menus in the project, so Baidu looked for relevant information and found that there were a lot of zTree information, which was quite good. In addition, the zTree official API documentation also provided a very detailed introduction. After some great competition, I finally got it out, so remember, it is also a summary of learning zTree.

ZTree introduction:

1. zTree uses JQuery's core code to implement a set of Tree plug-ins that can complete most common functions.

2. zTree v3.0 separates the core code by function. You do not need to load unnecessary code.

3. Using the delayed loading technology, tens of thousands of nodes can be easily loaded, even in IE6, the second kill can be basically achieved

4. compatible with IE, FireFox, Chrome, Opera, Safari, and other browsers

5. Support for JSON data

6. Support static and Ajax asynchronous loading of node data

7. Supports any skin replacement/custom icons (depending on css)

8. Extremely flexible checkbox or radio Selection

9. Multiple Event Response callbacks

10. flexible editing (add, delete, modify, and query) functions. You can drag and drop nodes at will, or drag multiple nodes.

11. Multiple Tree instances can be generated simultaneously on one page.

Core functions and attributes:

Core:ZTree (setting, [zTreeNodes])

This function uses a JSON Data Object setting and a JSON Data Object zTreeNodes to create a Tree.

Core parameters:Setting

The zTree parameter configuration is completed here. Simply put, the style, event, and access path of the tree are all configured here.

var setting = {   showLine: true,   checkable: true  };

Because there are too many parameters, see zTreeAPI for details.

Core parameters:ZTreeNodes

All node data sets of zTree use a data structure composed of JSON objects. Simply put, all information of the tree is saved in Json format.

1. zTree Official Website: http://www.ztree.me/v3/main.php#_zTreeInfo

The source code, instance, and API of zTree can be downloaded from the official website. The author's pdf API is very detailed.

The methods for obtaining node data of zTree are static (directly defined) and dynamic (loading back-end databases ).

Specific configuration steps:

Step 1-- Introduce Related Files

 
Related Article

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.