Hi!
I am trying to use a generic js view to build a dropdown with search bar. I have seen other forums that mention how to use specific js libraries but I just can’t get this to work. Granted I am very new to js but I can’t seem to understand how to replicate from those other examples.
Trying to use select2 which has a pretty simple example (below) but again just don’t know how to get this working.
From select2 (link):
<select class="js-example-basic-single" name="state">
<option value="AL">Alabama</option>
...
<option value="WY">Wyoming</option>
</select>
// In your Javascript (external .js resource or <script> tag)
$(document).ready(function() {
$('.js-example-basic-single').select2();
});
Appreciate any help!!