$(window).on('load', function () { $('#out-of-stock-modal').modal('show'); }); in javascript code example
Example: bootstrap show modal on page load
<script type="text/javascript">
$(window).on('load',function(){
$('#myModal').modal('show');
});
</script>