Menü schliessen
Created: June 5th 2025
Last updated: June 11th 2025
Categories: Common Web Development,  IT Development
Author: Tim Fürer

jQuery Nice Select: Listen to Change Event

Tags:  guide,  Javascript,  jQuery,  web

jQuery Nice Select is one of those old jQuery-based select overhaul packages. It's abandoned and outdated and its documentation is rather sparse, but you may still stumble upon and find yourself having to work with it. A common challenge you may encounter is listening to the select element changing or updating its value.


How to do it

If you're here, you may have already tried attaching an event listener to the select element, listening to "change" or "Input", like so:

select.addEventListener('change', () => {
  // do stuff
});
select.addEventListener('input', () => {
  // do stuff
});

...which unfortunately does not work.

What does work, however, is listening through jQuery. So, attach the event listener with the desired callback to the select element like so instead:

jQuery(select).on('change', function() {
  // do stuff
});