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?

Johnson_145
  • 1,994
  • 1
  • 17
  • 26
  • could you please add your code here – Murali N Nov 29 '12 at 17:34
  • there is no special code i am trying to evaluate. the error is thrown right in the jqueryui script file. – Johnson_145 Nov 29 '12 at 17:37
  • Have you added Jquery.min.js file – Murali N Nov 29 '12 at 17:44
  • 1
    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). – Manuel Leuenberger Nov 29 '12 at 17:45
  • 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 libraries – Johnson_145 Nov 29 '12 at 17:48
  • also tried to include the scripts via google code – Johnson_145 Nov 29 '12 at 17:50
  • 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?). – Manuel Leuenberger Nov 29 '12 at 18:19
  • 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. Thanks – Johnson_145 Nov 29 '12 at 19:38

3 Answers3

53

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

Johnson_145
  • 1,994
  • 1
  • 17
  • 26
  • 13
    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. – Marlon Feb 04 '13 at 12:48
  • The second script was loaded automatically by ASP.NET bundle, because I did not remove its old version from server. – Der_Meister Mar 11 '15 at 11:47
  • removed inclusion of /libs/jquery/jquery.ui.widget.js & was OK (see Marlon) – zzapper Sep 04 '15 at 13:51
  • If it helps anyone i encountered this error from having two versions of jquery being loaded (alongside jquery UI) – Friendly Code Jan 05 '18 at 13:29
  • In my case it was unnecessarily added `jquery.ui.slider.all.js` – Esamo Mar 22 '22 at 15:39
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

Ali Adravi
  • 21,707
  • 9
  • 87
  • 85
0

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

Markus
  • 829
  • 7
  • 15