--- title: Events metadata: description: Listening to Select2's built-in events, and manually triggering events on the Select2 component. taxonomy: category: docs process: twig: true never_cache_twig: true --- Select2 will trigger a few different events when different actions are taken using the component, allowing you to add custom hooks and perform actions. You may also manually trigger these events on a Select2 control using `.trigger`. | Event | Description | | ----- | ----------- | | `change` | Triggered whenever an option is selected or removed. | | `change.select2` | Scoped version of `change`. See [below](#limiting-the-scope-of-the-change-event) for more details. | | `select2:closing` | Triggered before the dropdown is closed. This event can be prevented. | | `select2:close` | Triggered whenever the dropdown is closed. `select2:closing` is fired before this and can be prevented. | | `select2:opening` | Triggered before the dropdown is opened. This event can be prevented. | | `select2:open` | Triggered whenever the dropdown is opened. `select2:opening` is fired before this and can be prevented. | | `select2:selecting` | Triggered before a result is selected. This event can be prevented. | | `select2:select` | Triggered whenever a result is selected. `select2:selecting` is fired before this and can be prevented. | | `select2:unselecting` | Triggered before a selection is removed. This event can be prevented. | | `select2:unselect` | Triggered whenever a selection is removed. `select2:unselecting` is fired before this and can be prevented. | ## Listening for events All public events are relayed using the jQuery event system, and they are triggered on the `





## Preventing events

See https://stackoverflow.com/a/26706695/2970321.

## Internal Select2 events

Select2 has an [internal event system](/advanced/default-adapters/selection#eventrelay) that works independently of the DOM event system, allowing adapters to communicate with each other. This internal event system is only accessible from plugins and adapters that are connected to Select2 - **not** through the jQuery event system.

You can find more information on the public events triggered by individual adapters in the [advanced chapter](/advanced).