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); }); + });
+
Closes the dropdown
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.
Enables Select2.
+Toggles readonly mode on Select2 and its underlying form component based on the boolean parameter.