Fixed modal height and positioning on screen

This commit is contained in:
Fabio Manganiello 2019-01-08 19:23:06 +01:00
parent 3c385a601f
commit 9ba7a68578

View file

@ -149,6 +149,12 @@ $(document).ready(function() {
$('body').on('mouseup touchend', '[data-modal]', function(event) {
var $source = $(event.target);
var $modal = $($source.data('modal'));
$modal.height($(document).height() + 2);
var $container = $modal.find('.modal-container');
var top = 40 + $(window).scrollTop();
$container.css('margin-top', top + 'px');
$modal.fadeIn();
});
};