Select2 doesn't work


#1

Hi,

I need your help: It doesn’t work. What did I wrong ? Please help me.

Thanks,

Michel

<!DOCTYPE html>
<html>
<head>
<title>Repertoire Rechte ändern</title>

<link rel="stylesheet" href="css/uikit.min.css" />
<script src="js/uikit.min.js"></script>
<script src="js/uikit-icons.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/css/select2.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/js/select2.min.js"></script>



<script type="text/javascript">
$(document).ready(function() {
    $('.js-example-basic-multiple').select2();
});
</script> 
<style>
html,

</style>
</head>
<body>

	<select class="js-example-basic-multiple" name="states[]" multiple="multiple">
  <option value="AL">Alabama</option>
    ...
  <option value="WY">Wyoming</option>
</select>										
	


</body>
</html>

#2

Your code basically works for me. I think the problem is that you haven’t loaded jQuery. You need to include a <script> tag to load the jQuery library; for example:
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>