# \[SELECT2] dropdownParent (ok)

![](https://2726517656-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M1E4Gk2ppVKb4olmnun%2F-MQQgvZvg0tATOn75PLK%2F-MQQiUbd0a37bCuEH0f2%2FScreenshot_11.jpg?alt=media\&token=35fc6b8e-e23b-4f58-b0d2-362c232bb035)

```
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>JS Bin</title>
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.0/css/select2.min.css" />
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0-alpha1/jquery.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.0/js/select2.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.0/js/i18n/vi.js"></script>
</head>
<body>
  <div >
    <div id="myModal">
      <select id="pictures_tag_input" style="width: 300px;">
        <option>red</option>
        <option>green</option>
        <option>blue</option>
      </select>
    </div>
  </div>
  <script type="text/javascript">
    $(document).ready(function() {
      $("#pictures_tag_input").select2({
        dropdownParent: $('#myModal')
      });
    });
  </script>
</body>
</html>
```
