Answers for "automatic modal popup"

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
0

bootstrap pop modal from another modal

// Hide current modal before opening new one
$("#idModal").modal('hide');
$("#idModal2").modal() // or .modal("show");

// show 1st modal again after closing 2nd modal
$("#idModal2").on('hidden.bs.modal', () => $("#idModal").modal('show'))
// using hide.bs.modal might cause modal to stop scrolling!!!
Posted by: Guest on April-07-2021
0

modal behind html element

<div class="modal" id="modal"></div>

</body>

</html>
Posted by: Guest on February-25-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language