jquery-nice-select
jquery-nice-select copied to clipboard
Not working in JQuery 3.2.1
Just doesn't display the list. Class "open" can't be added to select.
It happens, because an event click generates on the nice-select two times instead one. But i click only one time, hence the "open" class is removed by script, dunno what is wrong. I have decided the problem by setting time interval between clicks, and checking how many time passed between them. That works not bad, but anyway, it's a kludge!
this is a fix for me
// Close when clicking outside $(document).on('click.nice_select', function(event) { if ($(event.target).closest('.nice-select').length === 0 && event.target.tagName !== 'SELECT') { $('.nice-select').removeClass('open').find('.option'); } });
maybe related to https://github.com/hernansartorio/jquery-nice-select/issues/46 ?