How to fix $ .ui.dialog.defaults undefined error

I have one error on my page and it stops another javascript from working:

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

error

What steps can I take to fix this error?

In my 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

+4
source share
1 answer

What version of jQuery user interface are you using? The default values โ€‹โ€‹have been migrated 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 sensible way) to rectify the situation is to go through all your code and change all your $.ui.X.defaults to $.ui.X.prototype.defaults , where X is the jQuery-UI widget in question. It would also be useful to read the update guide for other possible issues.

+6
source

Source: https://habr.com/ru/post/1334290/


All Articles