I have the following data in 2 different arrays:
Level 1
3.0 abc
2.1 xyz
2.0 pqr
Level 2
3.0.0.8 abc
3.0.0.7 pqr
2.1.0.155 lmn
2.1.0.151 rst
2.0.5.16 jhw
2.0.0.96 lqs
Now I want to arrange them in a collapsible tree fashion, which would look like this:
(+) 3.0 abc
- 3.0.0.8 abc
- 3.0.0.7 pqr
(+) 2.1 xyz
- 2.1.0.155 lmn
- 2.1.0.151 rst
(+) 2.0 pqr
- 2.0.5.16 jhw
- 2.0.0.96 lqs
I know it can be done with Javascript and Jquery. But can someone give me some sample code or some pointers to some very basic code which I can understand.