Today I am going to share how to use
Select2
Api. Select2 gives you a customizable select box with support for
searching, tagging, remote data sets, infinite scrolling, and many other
highly used options. I am going to use cdn file but you can also
download it and use it on your local server.
<html>
<head>
</head>
<body>
<div style="width: 100%; height: 100%; margin: auto; text-align: center;padding:25px;">
<select class="form-control select2" multiple="multiple">
<option value="Apple">Apple</option>
<option value="Banana">Banana</option>
<option value="Berry">Berry</option>
<option value="Guava">Guava</option>
<option value="Orange">Orange</option>
<option value="Pine Apple">Pine Apple</option>
</select>
</div>
<script>
$('.select2').select2();
</script>
</body>
</html>
No hay comentarios:
Publicar un comentario