I am using jquery blockui but the div that is being covered is very long, so the loading message shows up off the screen.
Is there anyway to have jquery blockui loading message vertically center on the visible screen so people can see the message without scrolling down ?
Here is the definite answer.
Create this function:
$.fn.center = function () { this.css("position","absolute"); this.css("top", ($(window).height() - this.height()) / 2+$(window).scrollTop() + "px"); this.css("left", ( $(window).width() - this.width() ) / 2+$(window).scrollLeft() + "px"); return this; }
After you call blockUI, center the dialog window like this:
$('.blockUI.blockMsg').center();