Articles → BOOTSTRAP → Multi-Select Dropdown In Bootstrap

Multi-Select Dropdown In Bootstrap






Cdns




<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.js"></script>
    
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
    <script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-multiselect/0.9.13/js/bootstrap-multiselect.js"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-multiselect/0.9.13/css/bootstrap-multiselect.css">



Code


<!DOCTYPE html>
<html lang="en">
<head>
    <title>Multiselect Dropdown Example</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.js"></script>
    
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
    <script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-multiselect/0.9.13/js/bootstrap-multiselect.js"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-multiselect/0.9.13/css/bootstrap-multiselect.css">



</head>
<body>

    <div class="container">
        <div class="">
            <strong>Select Language:</strong>
            <select id="multiple-checkboxes" multiple="multiple">
                <option value="php">PHP</option>
                <option value="javascript">JavaScript</option>
                <option value="java">Java</option>
                <option value="sql">SQL</option>
                <option value="jquery">Jquery</option>
                <option value=".net">.Net</option>
            </select>
        </div>
        <script>
            $(document).ready(function () {
                $('#multiple-checkboxes').multiselect({
                    includeSelectAllOption: true,
                });
            });
        </script>
    </div>

    

</body>
</html>



Output


Picture showing the output of multi-select dropdown in Bootstrap
Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Wednesday, November 24, 2021

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250