I just the following tutorial from official website select2 and get the error and this is the code
$('.tags').select2({
multiple: true,
tags: true
})
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.4/js/select2.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.4/css/select2.css" rel="stylesheet"/>
<select class="form-control tags" name="tags[]">
<option selected="selected">orange</option>
<option>white</option>
<option selected="selected">purple</option>
</select>
and error in the console like this
this is javascript code
$('.tags').select2({
theme: 'bootstrap',
tags: true
})
anyone can help me to solve the problem? <>