Here we will introduce a small, powerful, drag-and-drop jqueryTree plug-in that supports Asynchronization and has higher compatibility. The effect is as follows:
Select:
Drag:
Jquery. simple. tree. Official site address: http://news.kg/wp-content/uploads/tree/ (it seems that can not open), but because the operation is relatively simple, so we temporarily use it.
The jquery EasyUI Tree plug-in is simple and easy to use, but it still has many disadvantages after tests,
For example:
1. There is a problem with AJAX compatible with IE8.
2. loading may fail if asynchronous data is returned slowly.
3. We only use the Tree function, but its size is a little huge ....
What we need is good compatibility, Asynchronization, and small size (there are few scenarios using Tree, so it is better to use dedicated code files .)
Now, let's start jquery. simple. tree:
First, you need to load three files: CSS, Jquery main file, and its own js file;
Then, the code that defines the Tree;
Finally, write the HTML code of the root node of the tree;
The front-end code is as follows:
The Code is as follows:
Region selection