Reputation: 593
https://github.com/ehynds/jquery-ui-multiselect-widget/wiki/Methods
This is driving me crazy. All of the options are listed but not the way to set them!
I have tried everything I can think of, passing in values in the constructor, trying to call methods to set the options, nothing works.
Help greatly appreciated.
const $venueSelect = $("#venueSelect").multiselect(
{
options: {
noneSelectedText: 'MY CUSTOM TEXT' // (DOES NOT WORK)
},
close: function (event, ui) {
var venueIds = $('#venueSelect').val();
if (venueIds == '') {
window.location = '***';
} else {
window.location = `***`;
}
}
}
);
Upvotes: 1
Views: 511
Reputation: 337713
Given the example in the link from the documentation the noneSelectedText
property should be in the root of the options object you provide to the plugin instantiation. Try this:
const $venueSelect = $("#venueSelect").multiselect({
noneSelectedText: 'MY CUSTOM TEXT',
close: function(event, ui) {
var venueIds = $('#venueSelect').val();
if (venueIds == '') {
window.location = '***';
} else {
window.location = `***`;
}
}
});
Upvotes: 1