php - bootstrap multiple modals issue must open one after another closed

one text

Solution:

I did like this as @Cbroe advised and its working fine now , added a class on bootstrap close button .closeModal

<script type="text/javascript">
$( document ).ready(function() {
  for (i = 0; i < 1; i++) {
    $(modalArr[0]).modal('show');
    modalArr.shift();
  }
  });


$(".closeModal").on('click', function()
{ 
for (i = 0; i < 1; i++) {
$(modalArr[0]).modal('show');
 modalArr.shift();
}

});

console.log(modalArr);

</script>

Source