[Solved] Overlay or popup with full screen


Here’s an example for overlay, FIDDLE

(function($) {
  $('article').on('click', function() {
    if($('.overlay').length < 1) {
       $('body').append('<span class="overlay"></span>');
    }
  });

  $(document).on('click','.overlay', function() {
    $('.overlay').remove();   
  });
})(jQuery);

also include buttons in the events for open/close fancybox.


.overlay {
  background: rgba(50,50,50,0.5);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

solved Overlay or popup with full screen