diff --git a/select2-latest.html b/select2-latest.html index 2d572ef7..6870dc0c 100644 --- a/select2-latest.html +++ b/select2-latest.html @@ -853,8 +853,11 @@ $("#e15").select2("container").find("ul.select2-choices").sortable({ $(document).ready(function () { $("#e16").select2(); $("#e16_2").select2(); -$("#e16_enable").click(function() { $("#e16,#e16_2").select2("enable"); }); -$("#e16_disable").click(function() { $("#e16,#e16_2").select2("disable"); }); +$("#e16_enable").click(function() { $("#e16,#e16_2").select2("enable", true); }); +$("#e16_disable").click(function() { $("#e16,#e16_2").select2("enable", false); }); +$("#e16_readonly").click(function() { $("#e16,#e16_2").select2("readonly", true); }); +$("#e16_writable").click(function() { $("#e16,#e16_2").select2("readonly", false); }); + });
@@ -862,6 +865,7 @@ $("#e16_disable").click(function() { $("#e16,#e16_2").select2("disable"); });



+

Example Code

@@ -1556,13 +1560,13 @@ $("#select").select2({

Closes the dropdown

-

disable

+

enable(boolean)

-

Disables Select2. During this mode the user is not allowed to manipulate the selection.

+

Enables or disables Select2 and its underlying form component based on the boolean parameter.

-

enable

+

readonly(boolean)

-

Enables Select2.

+

Toggles readonly mode on Select2 and its underlying form component based on the boolean parameter.

container

diff --git a/select2-master b/select2-master index 83050fd2..55827b91 160000 --- a/select2-master +++ b/select2-master @@ -1 +1 @@ -Subproject commit 83050fd2fa4d31732f293d6e6c88ea7eb30378cc +Subproject commit 55827b9159cca41c94c2a232f49943cef602e52b