Open GoogleCodeExporter opened 8 years ago
In order to fix the issue I have to add resize function.
//call after the $.modal()
function ResizeOverlay() {
var winHeight = $(window).height();
var winWidth = $(window).width();
var docHeight = $(document).height();
var docWidth = $(document).width();
if (winHeight && winWidth) {
$("#simplemodal-overlay").css('height', winHeight);
$("#simplemodal-overlay").css('width', winWidth);
}
if (docWidth && docHeight) {
$("#simplemodal-overlay").css('height', docHeight);
$("#simplemodal-overlay").css('width', docWidth);
}
}
$(window).on("resize", methodToFixWinLayout);
function methodToFixWinLayout(e) {
var winHeight = $(window).height();
var winWidth = $(window).width();
//adjust elements css etc.....
if (winHeight && winWidth) {
$("#simplemodal-overlay").css('height', winHeight);
$("#simplemodal-overlay").css('width', winWidth);
}
}
$(document).on("resize", methodToFixDocLayout);
function methodToFixDocLayout(e) {
var docHeight = $(document).height();
var docWidth = $(document).width();
//adjust elements css etc.....
if (docWidth && docHeight) {
$("#simplemodal-overlay").css('height', docHeight);
$("#simplemodal-overlay").css('width', docWidth);
}
}
Original comment by kimzhuma...@gmail.com
on 10 Mar 2014 at 11:23
Here is the code for full screen overlay using CSS only....
http://www.corelangs.com/css/box/fulloverlay.html
Ling
Original comment by lingma...@gmail.com
on 31 May 2014 at 6:28
Original issue reported on code.google.com by
kimzhuma...@gmail.com
on 7 Mar 2014 at 4:47Attachments: