Jquery的blockUI无法在Firefox中运行 [英] Jquery's blockUI not working in Firefox

查看:101
本文介绍了Jquery的blockUI无法在Firefox中运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在firefox中构建一个扩展程序,它检查导航的URL,将其与本地阻止的URL列表进行比较,然后决定阻止或继续调用。



为了保持用户占用,我试图使用JQuery的blockUI函数来阻止页面,直到我的比较结果完成。但是,出于某种原因,Firefox每次调用blockUI时都会触发异常 NotSupportedError:不支持操作



以下是我的XUL代码

 <? xml version =   1.0 ?>  
<? xml-stylesheet href = .... type = text / css ?>
< !DOCTYPE TestExtension SYSTEM ... >
< overlay id = sample xmlns = http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul >
< script src = jquery-1.9.1.js / >
< script src = jquery.blockUI.js />
< script src = background.js />
< / overlay >





以下是我在 Background.js

 $ mb = jQuery.noConflict(); 
if (flag)
{
$ mb.blockUI.defaults.applyPlatformOpacityRules = ;
$ mb.blockUI(); // FIRES EXCEPTION
}



我的firefox版本是:20.0



非常感谢任何帮助。

解决方案

mb = jQuery.noConflict();
if (flag)
{


mb.blockUI.defaults.applyPlatformOpacityRules = ;

mb.blockUI(); // FIRES EXCEPTION
}



我的firefox版本是:20.0



非常感谢任何帮助。


I am building an Extension in firefox which checks the navigated URL, compares it to a list of locally blocked URL''s and then decides to block or proceed on with the call.

In order to keep the user occupied, i am trying to use JQuery''s blockUI function to block the page till the results of my comparison are complete. However, for some reason, Firefox fires an exception every time i call the blockUI NotSupportedError: Operation is not supported.

The following is my XUL Code

<?xml version="1.0"?>
<?xml-stylesheet href="...." type="text/css"?> 
<!DOCTYPE TestExtension SYSTEM "...">
<overlay id="sample" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
		<script src="jquery-1.9.1.js" />
		<script src="jquery.blockUI.js" />
		<script src="background.js" />
</overlay>



The following is how i call the BlockUI within my Background.js

$mb = jQuery.noConflict();
if (flag)
{
   $mb.blockUI.defaults.applyPlatformOpacityRules = false;
   $mb.blockUI(); // FIRES EXCEPTION
}


My firefox version is: 20.0

Any Help is greatly appreciated.

解决方案

mb = jQuery.noConflict(); if (flag) {


mb.blockUI.defaults.applyPlatformOpacityRules = false;


mb.blockUI(); // FIRES EXCEPTION }


My firefox version is: 20.0

Any Help is greatly appreciated.


这篇关于Jquery的blockUI无法在Firefox中运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆