"Select option yatendra ui developer"
Bootstrap 4.1.1 Snippet by yatendra00013

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-beta.1/dist/css/select2.min.css" rel="stylesheet" /> <script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-beta.1/dist/js/select2.min.js"></script> <h3 class="text-center mt-5">Select option with bootstrap and select 2</h3> <div class="row justify-content-center"> <div class="col-md-6"> <select class="js-example-basic-single w-100" name="state"> <option value="AL">Alabama</option> ... <option value="WY">Wyoming</option> </select> </div> </div>
// In your Javascript (external .js resource or <script> tag) $(document).ready(function() { $('.js-example-basic-single').select2(); });

Related: See More


Questions / Comments: