I am trying to develop a subscription pop up modal box using the latest framework from Bootstrap 4. However, I do not want my clients to click the button to subscribe, I want the subscription box to pop up as soon the page load. After numerous of tutorials, each one has failed. Does anyone know how to get around this?
<div id="myModal" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Modal Header</h4>
</div>
<div class="modal-body">
<p>Some text in the modal.</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
<script>
$(window).load(function(){
$('#myModal').modal('show');
});
</script>