开发者

How do I fix the error $.ui.dialog.defaults is undefined

I have one error on my page and it is stopping some other javascript from functioning correctly:

$.ui.dialog.defaults is undefined
      $.ui.dialog.defaults.bgiframe = true;

How do I fix the error $.ui.dialog.defaults is undefined

What steps can I take to fix this error开发者_运维知识库?

I have this in the head

<script language="JavaScript" type="text/javascript" src="http://www.mysite.com/demo/system/ext/jquery/jquery.js"></script>
<script language="JavaScript" type="text/javascript" src="http://www.mysite.com/demo/system/ext/jquery/jquery-ui.js"></script>

Thanks


Which version of jQuery UI are you using? The defaults were moved from $.ui.dialog.defaults to $.ui.dialog.prototype.options in version 1.8:

http://docs.jquery.com/UI/Upgrade_Guide_18#Properties_moved_from_.24.ui.foo_to_.24.ui.foo.prototype

The best way (and probably the only sane way) to fix things is to go through all your code and change all your $.ui.X.defaults references to $.ui.X.prototype.defaults where X is the jQuery-UI widget in question. A review of the Upgrade Guide for other possible issues would be a good idea too.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜