This is the first release of Select2 4.0. You can view the release announcement for an overview of the larger changes.
This builds upon the second release candidate, so review all previous release notes before upgrading from previous versions of Select2.
Supported environments
- jQuery 1.7.2+
- Modern browsers (Chrome, Firefox, Safari)
- Internet Explorer 8+
New features
- Fully compatible with AMD and UMD based loaders.
- Advanced plugin system that uses custom adapters.
- Full support for
jQuery.noConflict. - A
<select>is the recommended element once again and can be used for all options.
DOM Events
New
select2:closingis triggered before the dropdown is closedselect2:selectis triggered when an option is selected
Renamed
select2-closeis nowselect2:closeselect2-openis nowselect2:openselect2-openingis nowselect2:openingselect2-selectingis nowselect2:selectingselect2-removedis nowselect2:removedselect2-removingis nowselect2:unselecting
Removed
select2-clearinghas been removed in favor ofselect2:unselectingselect2-highlightselect2-loadedselect2-focusselect2-blur- All extra properties from the
changeevent were removedvalcan be retrieved with$element.val()insteadaddedcan be retrieved by listening toselect2:selectremovedcan be retrieved by listening toselect2:unselect