Ciao a tutti,
ho bisogno di creare una lista simile a questa
Ho trovato uno script che fa proprio questo ma carica i dati da una lista come questa
Vorrei caricare Categorie ( title ) , Sottocategorie ( children ) e Prodotti ( SubItem ) dinamicamente da un db mysql, ma non ho proprio idea di come fare.
Qualcuno può aiutarmi?
ho bisogno di creare una lista simile a questa
Ho trovato uno script che fa proprio questo ma carica i dati da una lista come questa
Codice:
var treeData = [
{title: "item1 with key and tooltip", tooltip: "Look, a tool tip!" },
{title: "item2: selected on init", select: true },
{title: "Folder", isFolder: true, key: "id3",
children: [
{title: "Sub-item 3.1",
children: [
{title: "Sub-item 3.1.1", key: "id3.1.1" },
{title: "Sub-item 3.1.2", key: "id3.1.2" }
]
},
{title: "Sub-item 3.2",
children: [
{title: "Sub-item 3.2.1", key: "id3.2.1" },
{title: "Sub-item 3.2.2", key: "id3.2.2" }
]
}
]
},
{title: "Document with some children (expanded on init)", key: "id4", expand: true,
children: [
{title: "Sub-item 4.1 (active on init)", activate: true,
children: [
{title: "Sub-item 4.1.1", key: "id4.1.1" },
{title: "Sub-item 4.1.2", key: "id4.1.2" }
]
},
{title: "Sub-item 4.2 (selected on init)", select: true,
children: [
{title: "Sub-item 4.2.1", key: "id4.2.1" },
{title: "Sub-item 4.2.2", key: "id4.2.2" }
]
},
{title: "Sub-item 4.3 (hideCheckbox)", hideCheckbox: true },
{title: "Sub-item 4.4 (unselectable)", unselectable: true }
]
}
];
Vorrei caricare Categorie ( title ) , Sottocategorie ( children ) e Prodotti ( SubItem ) dinamicamente da un db mysql, ma non ho proprio idea di come fare.
Qualcuno può aiutarmi?