JQuery multi-level tree drop-down menu instance code

jquery多级树形下拉菜单的实例代码

(1) introduction to the jQuery package, download address

(2) introduce Ztree package, download address
(3) Introduced Tree-select.js
(4) $ (“# id”). Treeselect (data);

                $ (Function () {var data = getdata (); $ ("# ts_input"). Treeselect (data);}; function getdata () {// ajax get DataVar Data = [{"Name": "Jiangsu", "PID": 0, "ID": -1, // "icon": "images / page.gif"}, {"name": "Zhejiang", "PID ": 0," ID ": -2, //" iCON ":" images / page.gif "}, {" name ":" Shaanxi "," PID ": 0," ID ": -3, // "icon": "images / page.gif"}, {"name": "Suzhou", "PID": -1, "id": 1, // "icon": "images / page.gif"}, {"Name": "Wuxi", "PID": -1, "ID": 2, // "IMAGES / page.GIF"}, {"name": "Changzhou", "PID ": -1," id ": 3, //" iCON ":" images / page.gif "}, {" name ":" Hangzhou "," PID ": -2," id ": 4, / / "icon": "images / page.gif"}, {"name": "Ningbo", "PID": -2, "ID": 5, // "iMages": "images / page.gif"} , {"Name": "Xi'an", "PID": -3, "ID": 6, // "icon": "images / page.gif"}, {"name": "Baoji", "PID" : -3, "ID": 7, // "icon": "images / page.gif"}, {"name": "Xianyang", "PID": -3, "ID": -4, // "icon": "images / page.gif"}, {"name": "Qin Du", "PID": -4, "ID": 9, // "iCON": "images / page.gif"} {"Name": "Yang Ling", "PID": -4, "ID": -5, // "iCON": "Images / page.gif"}, {"name": "Tree Garden", " PID ": -5," id ": 1, //" iCON ":" images / page.gif "}, {" name ":" 河 "," PID ": -5," id ": 2, / / "iCON": "images / page.gif"},]; return data;}  
summarizes The above is the instance code of the jQuery multi-level tree drop-down menu, which is given to you, I hope that if you have any questions, please leave a message, Xiaobian.Will reply to everyone in time. Thank you very much for your support of Tumi Cloud Website! If you think this article helps you, welcome to reprint, please indicate the source, thank you!
© Copyright Notice
THE END
Just support it if you like
like0
share
comment Grab the couch

Please log in to comment