How do I use on(‘click’) to activate the dropdown when use dropdownParent?
have try this:
$('.select').select2({
dropdownParent: $('#myModal')
}).on('click', function(){
this.select2("open");
});
How do I use on(‘click’) to activate the dropdown when use dropdownParent?
have try this:
$('.select').select2({
dropdownParent: $('#myModal')
}).on('click', function(){
this.select2("open");
});
This doesn’t work? Which element do you want to click on to open the dropdown? As far as I know, dropdownParent
shouldn’t affect the behavior of open
.