Custom Bootstrap Modal backdrop

// Add an extra class to the modal backdrop to make it customizable

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.1/css/all.min.css">
<!-- *** BUTTON *** -->
<div class="row">
  <div class="col-12">
    <div class="text-center mt-5">
      <button class="btn btn-success btn-lg" data-toggle="modal" data-target="#myModal">
        <i class="fas fa-rocket mr-2"></i>Launch modal
      </button>							
    </div>
  </div>
</div>
<!-- *** END BUTTON *** -->

<!-- *** BLOCK QUOTE *** -->
<div class="row">
  <div class="col-12">
    <blockquote class="blockquote mt-5">
      <p><span class="lead text-primary">NOTE:</span> <small>With jQuery an extra class is added to <code class="highlighter-rouge">.modal-backdrop</code>. If you don't want to customize Bootstrap classes, you can now add your own class to Bootstraps <code class="highlighter-rouge">.modal-backdrop</code>. In CSS you can edit the styles of the custom class.</small>  
      </p>
    </blockquote>  
  </div>
</div>
<!-- *** END BLOCK QUOTE *** -->


<!-- *** MODAL *** -->
<div class="modal modal--custom fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="myModalLabel">
          Modal with custom backdrop
        </h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true"><i class="fas fa-times"></i></span>
        </button>
      </div>
      <div class="modal-body">
        <p>
          You can customize <code class="highlighter-rouge">.modal-backdrop--custom</code> with CSS now &hellip;
        </p>
      </div>
      <div class="modal-footer">
        <button...

CSS

/**** CUSTOM MODAL-BACKDROP ****/
.modal-backdrop.modal-backdrop--custom{
   background-color: #2ecc71;
}
/**** END CUSTOM MODAL-BACKDROP ****/

JavaScript

/* MODAL*/
// Add an extra class to the modal backdrop to make it customizable
$('.modal--custom').on('show.bs.modal', function (e) {
  setTimeout(function(){
    $('.modal-backdrop').addClass('modal-backdrop--custom');
  });
});
/* END MODAL*/