Home  >  Article  >  Web Front-end  >  Ultra-lightweight three-level expansion list based on jquery_jquery

Ultra-lightweight three-level expansion list based on jquery_jquery

WBOY
WBOYOriginal
2016-05-16 18:07:271184browse

In the past few days, in the company's general management background, I have used the left and right framework structure. Click on the left side and expand the content on the right side. In the project, I often encounter the second or third level on the left side. I used to use dtree, but I found that dtree, The style and structure are difficult to control.
If it is dynamic data, you have to write it into the cs file and enter characters. This is not conducive to maintenance, and you will not be able to find it after a long time. ,
So today I wrote a lightweight three-level expansion menu. If necessary, you can add another level. Generally, three levels are enough for company projects.

Introduction:
You don’t need to define class and ID for the div part, as long as it has the following structure, the data can be dynamic or static
You can control the style and modify it to suit your own needs The style
Ultra-lightweight three-level expansion list based on jquery_jquery
code is as follows:
css

Copy code The code is as follows:



js:
Copy code The code is as follows:



div:
Copy code The code is as follows:

File package download
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn