diff --git a/docs/announcements-4.0.html b/docs/announcements-4.0.html
index dbf17677..86eae3cf 100644
--- a/docs/announcements-4.0.html
+++ b/docs/announcements-4.0.html
@@ -98,6 +98,31 @@ slug: announcements-4.0
+ Select2 now uses an
+ AMD-based build system,
+ allowing for builds that only require the parts of Select2 that you need.
+ While a custom build system has not yet been created, Select2 is open
+ source and will gladly accept a pull request for one.
+
+ Select2 includes the minimal almond
+ AMD loader, but a custom
+ The AMD methods used by Select2 are available as
+
A function has been created that allows old-style matcher functions to be
converted to the new style. You can retrieve the function from the
- AMD-based build system
+
+ select2.amd.js
build is available
+ if you already use an AMD loader. The code base (available in the
+ src
directory) also uses AMD, allowing you to include Select2
+ in your own build system and generate your own builds alongside your
+ existing infrastructure.
+ jQuery.fn.select2.amd.define()/require()
, allowing you to use the
+ included almond loader. These methods are primarily used by the
+ translations, but they are the recommended way to access custom modules
+ that Select2 provides.
+ select2/compat/matcher
module.
+ select2/compat/matcher
module, which should just wrap the old
+ matcher function.
More flexible placeholders
@@ -234,5 +260,54 @@ $("select").select2({
the old functionality of Select2 where the placeholder option was blank by
default.
+ In past versions of Select2, choices were displayed in the order that
+ they were selected. In cases where Select2 was used on a
+ <select>
element, the order that the server recieved
+ the selections did not always match the order that the choices were
+ displayed, resulting in confusion in situations where the order is
+ important.
+
+ Select2 will now order selected choices in the same order that will be + sent to the server. +
+ +
+ As Select2 now uses a <select>
element for all data
+ sources, a few methods that were available by calling
+ .select2()
are no longer required.
+
+ The val
method has been deprecated and will be removed in
+ Select2 4.1. The deprecated method no longer includes the
+ triggerChange
parameter.
+
+ You should directly call val
on the underlying
+ <select>
element instead. If you needed the second
+ parameter (triggerChange
), you should also call
+ .trigger("change")
on the element.
+
+ Select2 will respect the disabled
property of the underlying
+ select element. In order to enable or disable Select2, you should call
+ .prop('disabled', true/false)
on the
+ <select>
element. This method will be completely
+ removed in Select2 4.1.
+