Fixed modal height and positioning on screen
This commit is contained in:
parent
3c385a601f
commit
9ba7a68578
1 changed files with 6 additions and 0 deletions
|
@ -149,6 +149,12 @@ $(document).ready(function() {
|
||||||
$('body').on('mouseup touchend', '[data-modal]', function(event) {
|
$('body').on('mouseup touchend', '[data-modal]', function(event) {
|
||||||
var $source = $(event.target);
|
var $source = $(event.target);
|
||||||
var $modal = $($source.data('modal'));
|
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();
|
$modal.fadeIn();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue