jQuery UI TypeError: e.widget.extend is not a function
Asked Answered
G

3

24

I have updated my jQuery files including jQUery UI to use the tooltip feature.

But now Javascript is dieing with the following error:

TypeError: e.widget.extend is not a function

Can anyone help me?

Gabon answered 29/11, 2012 at 17:26 Comment(8)
could you please add your code hereGraviton
there is no special code i am trying to evaluate. the error is thrown right in the jqueryui script file.Gabon
Have you added Jquery.min.js fileGraviton
The error is thrown even if you do not call any jQuery UI function? Then you must have forgotten to include a correct version of jQuery (1.6+ should work with UI 1.9).Mamelon
I have added both files in the newest versions. jQuery version v1.8.3 jQuery UI - v1.9.2 - 2012-11-24 Tried both: the min versions and the bigger one. And yes the error is occuring without any running jQuery code expcept the including of the mentioned librariesGabon
also tried to include the scripts via google codeGabon
Then it must be some other included JavaScript that screws it up. Try removing the included scripts one-by-one until you find the one (override the $ object?).Mamelon
A little bit confusing, because the real source of error was not visible because of another one. but you are right, there was another hidden include of jquery ui. ThanksGabon
G
53

jQuery Ui was included twice (second time hidden because of another bug) problem solved

Gabon answered 29/11, 2012 at 19:40 Comment(5)
Just to help if someone had the same problem, i had the problem too, and in my case, i used to had jquery.ui.widget.js in a separate file. When i download the new version of jquery ui, i get the full version, wich already includes the widget funcionality. So even if i don't have the same file added twice, the same funcionality was included in diferente files.Choplogic
The second script was loaded automatically by ASP.NET bundle, because I did not remove its old version from server.Berkeleianism
removed inclusion of /libs/jquery/jquery.ui.widget.js & was OK (see Marlon)Madeleinemadelena
If it helps anyone i encountered this error from having two versions of jquery being loaded (alongside jquery UI)Stalinabad
In my case it was unnecessarily added jquery.ui.slider.all.jsTruckle
M
1

I was getting the similar error for tag-it.min.js

b.widget is not a function tag-it.min.js

When I check, found my files were loading in this case

<script src="/scripts/tag-it.min.js">
<script src="/scripts/jquery-ui-1.11.1.js">

Just reverse the order and it is fixed

Might be it can help someone

Melchizedek answered 15/11, 2014 at 2:32 Comment(0)
Y
0

I had to add wp_deregister_script( 'jquery-ui-widget' ); to admin-footer.php for an exception for widgets.php file only.

Yeo answered 4/2, 2015 at 2:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.