“SELECT2” Respostas de código

Select2 RestriC 5 Seleção

$("#tags").select2({
    maximumSelectionLength: 3
});
Make Your Own Project

SELECT2

<!-- Style -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/select2.min.css" rel="stylesheet" />
<!-- Script -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/select2.min.js"></script>
<script>
// In your Javascript (external.js resource or <script> tag)
$(document).ready(function() {
    $('.js-example-basic-single').select2();
});
</script>
Terrible Tern

.SELECT2-SELEÇÃO__Arrow {Hight: 34px! IMPORTANTE; }

.select2-selection__rendered {
    line-height: 31px !important;
}
.select2-container .select2-selection--single {
    height: 35px !important;
}
.select2-selection__arrow {
    height: 34px !important;
}
Busy Batfish

SELECT2 Exemplo HTML

<html>
        <script src="https://code.jquery.com/jquery-2.2.4.js"></script>
        <link href="https://rawgit.com/select2/select2/master/dist/css/select2.min.css" rel="stylesheet" />
        <script src="https://rawgit.com/select2/select2/master/dist/js/select2.js"></script>

        <select id="example" style="width: 300px">
            <option></option>
            <option value="JAN">January</option>
            <option value="FEB">February</option>
            <option value="MAR">March</option>
            <option value="APR">April</option>
            <option value="MAY">May</option>
            <option value="JUN">June</option>
            <option value="JUL">July</option>
            <option value="AUG">August</option>
            <option value="SEP">September</option>
            <option value="OCT">October</option>
            <option value="NOV">November</option>
            <option value="DEC">December</option>
        </select>

        <script>
            window.onpageshow = function() {
                $('#example').select2({
                    allowClear: true,
                    placeholder: 'Select a month'
                });
            };
        </script>
</html>

Juice WRLD

SELECT2

$('.js-example-basic-single').select2({
  placeholder: 'Select an option'
});

SELECT2

// In your Javascript (external .js resource or <script> tag)
$(document).ready(function() {
    $('.js-example-basic-single').select2();
});
mouaadBch

Respostas semelhantes a “SELECT2”

Perguntas semelhantes a “SELECT2”

Mais respostas relacionadas para “SELECT2” em JavaScript

Procure respostas de código populares por idioma

Procurar outros idiomas de código