This example show you how to:
<select id="country_id" class="mSelect" multiple="multiple"></select>
$(function () {
$('#country_id').mSelect({
url: 'ajax/example1.php',
returnSelectedLabels: { // Activate the return of the selected labels
enable: true
},
onDropdownHide: function(selectedIds, selectedLabels) { // callback functions
console.log('the mSelect is closed');
console.log('------- The selectedIds ---------');
console.log(selectedIds);
console.log('------- The selectedLabels ------');
console.log(selectedLabels);
}
});
});