“Select2 w modalnym” Kod odpowiedzi

Wybierz2 w modalnym nie działa

//replace it with your script
<script>
    $('#mySelect2').select2({
        dropdownParent: $('#myModal')
    });
</script>
Copy Paster

Select2 Bootstrap Modal Problem

 $('.select2').select2({
 dropdownParent: $('#modal .modal-body')
 });
Nasty Nightingale

Select2 w modalnym

<div id="myModal" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
    ...
    <select id="mySelect2">
        ...
    </select>
    ...
</div>

...

<script>
    $('#mySelect2').select2({
        dropdownParent: $('#myModal')
    });
</script>
Terrible Tern

EXFORCEFOCUS SELECT2 Modal

// Do this before you initialize any of your modals
$.fn.modal.Constructor.prototype.enforceFocus = function() {};
Joyous Jaguar

Odpowiedzi podobne do “Select2 w modalnym”

Pytania podobne do “Select2 w modalnym”

Więcej pokrewnych odpowiedzi na “Select2 w modalnym” w HTML

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu