var data = [
{
"label": "WKS-FINGER1",
"children": [
{
"label": "WKS1",
"value": "WKS1"
},
{
"label": "WKS2",
"value": "WKS2"
},
{
"label": "WKS2",
"value": "WKS2"
}
]
},
{
"label": "WKS-FINGER",
"children": [
{
"label": "WKS3",
"value": "WKS3"
}
]
},
{
"label": "WKS-FINGER2",
"children": [
{
"label": "WKS4",
"value": "WKS4"
}
]
}
];
$('#myid').multiselect({
enableClickableOptGroups: true,
buttonWidth: '200px',
onChange: function(option, checked, selected,element) {
var selectionData = [];
$('#myid option:selected').each(function() {
selectionData.push([$(this).val() , $(this).data('order') ]);
});
alert(selectionData);
}
});
$('#myid').multiselect('dataprovider', data);
As per the above code I am able to get the option values from drop down but how to get the values of the selected groups also when any value is selected. For eg . if somebody selects WKS-FINGER1
group I need its group value WKS-FINGER1
and not the option value and vice versa.