Answers for "bootstrap 4 modal auto open"

2

bootstrap show modal on page load

<script type="text/javascript">
    $(window).on('load',function(){
        $('#myModal').modal('show');
    });
</script>
Posted by: Guest on September-28-2020
1

bootstrap 4 modal popup remote url

$('body').on('click', '[data-toggle="modal"]', function(){
        $($(this).data("target")+' .modal-body').load($(this).data("remote"));
    });
Posted by: Guest on January-19-2021
0

bootstrap modal open event

$('#code').on('shown.bs.modal', function (e) {
  // do something...
})
Posted by: Guest on June-03-2021
0

bootstrap 4 start modal in modal

var modal_lv = 0;
$('.modal').on('shown.bs.modal', function (e) {
    $('.modal-backdrop:last').css('zIndex',1051+modal_lv);
    $(e.currentTarget).css('zIndex',1052+modal_lv);
    modal_lv++
});

$('.modal').on('hidden.bs.modal', function (e) {
    modal_lv--
});
Posted by: Guest on March-15-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language