JSFiddle - React, Tailwind, and code Playground

HTML

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
<body>
  Text in body of page

  <!-- MAIN CONTAINER -->
  <section class="maincontainer">

    <div id="divMain" class="Main">
      <div id="divLoading" class="modal fade">
        <div class="loader">
          <br />
          <br /> loading div actual div has a spinner but not need to show error
        </div>
        <div class="modal-dialog invisible">

        </div>
      </div>
    </div>
  </section>
  <!-- JS FILES -->


</body>

JavaScript

$(function() {
   showLoading();
   //do some work then hide
   hideLoading();
 });


 function showLoading() {
   $('#divLoading').modal({
     backdrop: 'static',
     keyboard: false
   });
 }

 function hideLoading() {
   $("#divLoading").modal('hide');
 }