Any alternative to blockUI for jQuery?

The question says it all! I am looking for an easy-to-use alternative to blockUI for jQuery . I tried for several days to center the dialog box with blockUI in both FireFox and IE, but no chance. This does not work. I considered this question about centering the blockUI dialog box ( How can I get the DIV for the center on the page using jQuery and blockUI? ), But it only works with Firefox.

+5
source share
5 answers

For dialogs, I switched from blockUI to JQuery UI . I think this is better.

+3

jQuery MSG. , ie6. , 4k .

// this will block the page and shows a `please wait` message
$.msg();

// you can change the content by the following code
$.msg({
  content : '<img src="loading.gif"/> Sending mail :)'
});

-

github

, ,

DOM, jQuery Center

+6

, . , , ( , )

$.fn.vCenter = function(options) {
    var pos = {
        sTop : function() {
            return window.pageYOffset || $.boxModel && document.documentElement.scrollTop || document.body.scrollTop;
        },
        wHeight : function() {
            if ($.browser.opera || ($.browser.safari && parseInt($.browser.version) > 520)) {
                return window.innerHeight - (($ (document).height() > window.innerHeight) ? getScrollbarWidth() : 0);
            } else if ($.browser.safari) {
                return window.innerHeight;
            } else {
                return $.boxModel && document.documentElement.clientHeight || document.body.clientHeight;
            }
        }
    };
    return this.each(function(index) {
        if (index == 0) {
            var $this = $(this),
                $w = $(window),
                topPos = ($w.height() - $this.height()) / 2 + $w.scrollTop()
            ;
            if (topPos < 0 && (options == undefined || !options.allowNegative)) topPos = 0;
            $this.css({
                position: 'absolute',
                marginTop: '0',
                top: topPos //pos.sTop() + (pos.wHeight() / 2) - (elHeight / 2)
            });
        }
    });
};
$.fn.hCenter = function(options) {
    return this.each(function(index) {
        if (index == 0) {
            var $this = $(this),
                $d = $(document),
                leftPos = ($d.width() - $this.width()) / 2 + $d.scrollLeft()
            ;
            if (leftPos < 0 && (options == undefined || !options.allowNegative)) leftPos = 0;
            $this.css({
                position: "absolute",
                left: leftPos
            });
        }
    });
};
$.fn.hvCenter = function(options) {
    return this.vCenter(options).hCenter(options);
};

:

$('#verticalCenter').vCenter();
$('#horizontalCenter').hCenter();
$('#bothCentered').hvCenter();
0

If the problem was caused by loading the sizes plugin along with the latest version of jQuery, then Dimensions was merged with the database several versions ago and caused a conflict.

0
source

From the documentation:

Why can't I see overlays in FF on Linux?

Several people told me that the full page opacity handling in FF / Linux is crazy, so it is disabled by default for this platform. You can enable it by overriding the applyPlatformOpacityRules property as follows:

// enable transparent overlay on FF/Linux 
$.blockUI.defaults.applyPlatformOpacityRules = false;
0
source

All Articles