Chrome / Firefox doesn't display images in objects shown in beforeunload event

前端 未结 2 1818
鱼传尺愫
鱼传尺愫 2020-12-22 12:11

I\'m using jQuery blockUI plugin to show some nifty \"loader\" on each AJAX call and each URL change.

Here is full code responsible for that:

var roo         


        
2条回答
  •  北海茫月
    2020-12-22 13:05

    Seems to me like yout rootpath is not allways what you excpect it to be.

    I would suggest adding the loading message to the dom and set it inline to display : none.

    Now when you toggle the visibility in the developer tools you can inspect that that your loading image is displayed correctly. This is a prerequisite for the correct behavior.

    You can assign a Jquery enhanced DOM Element directly to the message property and $.blockUI will use the content of that piece for the block message.

    $.blockUI.defaults.message = $('#loadingMessage');
    

    http://jsfiddle.net/straeger/gxzbE/2/

    I hope I could help you...

提交回复
热议问题