# \[SELECT2] Disabling a Select2 control (ok)

Example disabled (ok)

```
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <link href="https://cdn.jsdelivr.net/npm/select2@4.0.13/dist/css/select2.min.css" rel="stylesheet" />
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/select2@4.0.13/dist/js/select2.min.js"></script>
</head>

<body>
  <select class="js-example-basic-single" name="state">
    <option value="">--Select--</option>
    <option value="AL">Alabama</option>
    <option value="WY">Wyoming</option>
  </select>
  <script>
    $(document).ready(function() {
      $('.js-example-basic-single').select2();
      $(".js-example-basic-single").prop("disabled", true);
    });
  </script>
</body>

</html>
```

![](https://2494213435-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LYjAG13rAPdbArSfRyB%2F-M7gAPFBd57-H8En7WJ-%2F-M7gBz6m_Ga_JFabr6hF%2F2.png?alt=media\&token=bcf1c0a4-1b85-44b0-96a7-b29d46fe21c9)

Example disabled multi (ok)

```
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <link href="https://cdn.jsdelivr.net/npm/select2@4.0.13/dist/css/select2.min.css" rel="stylesheet" />
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/select2@4.0.13/dist/js/select2.min.js"></script>
</head>

<body>
  <label for="id_label_multiple">
    <p>Click this to highlight the multiple select element</p>
    <select class="js-example-basic-multiple js-states form-control" id="id_label_multiple" multiple="multiple">
      <option value="0">Alabama</option>
      <option value="AL">Alabama</option>
      <option value="WY">Wyoming</option>
    </select>
  </label>
  <script>
  $(document).ready(function() {
    $('.js-example-basic-multiple').select2();
    $(".js-example-basic-multiple").prop("disabled", true);
  });
  </script>
</body>

</html>
```

![](https://2494213435-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LYjAG13rAPdbArSfRyB%2F-M7gC-lR-SAEKyPxGeJz%2F-M7gCq8F6Ob5qUyHIYP6%2F3.png?alt=media\&token=75df706f-1ea5-453d-a4e7-2531f17df8d3)

