I will have 3 <select multiple="multiple"> and I would like to fill them using a JSON array.
{
"folders": [
{
"name": "folderName1",
"files": [
{
"name": "filesName1",
"item": [
{
"name": "itemName1"
}
]
}
]
},
{
"name": "folderName2",
"files": [
{
"name": "fileName2",
"item": [
{
"name": "itemName2"
}
]
}
]
}
]
}
And I would like to fill the 1st select using the ALL folder – names.
And then filter the content of the other selects using the selected value in the first select box. For example when I select foldername1 in the first select I would like to show only option fileName1 in the second select and itemName1 in the third select;
Is it possible to achieve that using jQuery?
Until now I have the following: http://jsfiddle.net/dvMv9/26/
Here is working code, and a link on fiddle.
http://jsfiddle.net/yPDGA/