Last updated 6 years ago
Select2 gives you a customizable select box with support for searching, tagging, remote data sets, infinite scrolling, and many other highly used options.
<select class="form-control select2"> <option>Select</option> <optgroup label="Alaskan/Hawaiian Time Zone"> <option value="AK">Alaska</option> <option value="HI">Hawaii</option> </optgroup> </select>
<!-- select2 CSS --> <link href="vendors/select2/dist/css/select2.min.css" rel="stylesheet" type="text/css" />
<!-- Select2 JavaScript --> <script src="vendors/select2/dist/js/select2.full.min.js"></script> <script src="dist/js/select2-data.js"></script>
/* Select2 Init*/ "use strict"; $(".select2").select2(); $("#input_tags").select2({ tags: true, tokenSeparators: [',', ' '] });