jQuery Mobile + UI: Uncaught TypeError (1.2.0 alpha) #4805

Closed
idangozlan opened this Issue Aug 6, 2012 · 19 comments

Comments

Projects
None yet

hey,

im trying to use 1.2.0 alpha uncompressed and its throw exception..
link - http://code.jquery.com/mobile/1.2.0-alpha.1/jquery.mobile-1.2.0-alpha.1.js

thanks!

Member

jaspermdegroot commented Aug 6, 2012

@idangozlan

This basic test page uses 1.2 alpha, but I don't see any errors: http://jsbin.com/atahip/42.
Can you provide a test page and information about what platform/browser you tested?

Hey, its a local webpage so i cant provide you link, but i run by chrome latest version, and get the following error

Uncaught TypeError: Object function (b,c,d){var e=b.split(".")[0],f;b=b.split(".")[1],f=e+"-"+b,d||(d=c,c=a.Widget),a.expr[":"][f]=function(c){return!!a.data(c,b)},a[e]=a[e]||{},a[e][b]=function(a,b){arguments.length&&this._createWidget(a,b)};var g=new c;g.options=a.extend(!0,{},g.options),a[e][b].prototype=a.extend(!0,g,{namespace:e,widgetName:b,widgetEventPrefix:a[e][b].prototype.widgetEventPrefix||b,widgetBaseClass:f},d),a.widget.bridge(b,a[e][b])} has no method 'extend' jquery.mobile-1.2.0-alpha.1.js:561

Contributor

MauriceG commented Aug 6, 2012

HI @idangozlan

Please check if jQuery is loaded successfully before jQM: <script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>

Maurice

yes its loaded..

The problem has solved when i removed jQuery UI js..
jquery-ui-1.8.21.custom.min.js

Contributor

MauriceG commented Aug 6, 2012

@idangozlan

as far as I know: "These two libraries aren't designed to play together"

Member

jaspermdegroot commented Aug 6, 2012

It's true that you might run into some issues if you use both Mobile and UI, but maybe an error like this can be prevented.

It seems there is a conflict because both jQuery Mobile and jQuery UI contain the Widget Factory.

@gseguin @johnbender - Can you take a look at this issue?

Contributor

johnbender commented Aug 6, 2012

Yah I'll take a look at this one.

On Mon, Aug 6, 2012 at 6:23 AM, Jasper de Groot <
reply@reply.github.com

wrote:

It's true that you might run into some issues if you use both Mobile and
UI, but maybe an error like this can be prevented.

It seems there is a conflict because both jQuery Mobile and jQuery UI
contain the Widget Factory.

@gseguin @johnbender - Can you take a look at this issue?


Reply to this email directly or view it on GitHub:
#4805 (comment)

I have a similar issue, only on latest Chrome on Win7 with also

Uncaught TypeError:method "addClass" not specified.

Got it on a page that was perfectly working on JQM 1.1.1 and that is not using jquery UI.

Also, no error on iOS Safari and Chrome, no error on Win7 Firefox or Safari.

Member

jaspermdegroot commented Aug 7, 2012

@istrasoft

Since you don't use UI your issue not really related to this one. Can you open a new ticket and provide a test page? Thanks!

Member

jaspermdegroot commented Aug 7, 2012

@idangozlan @johnbender - FYI: I changed the topic of this ticket.

@ugomobi Ok well I can't seem to isolate the issue. in jsFiddle it works fine even though I didn't change a thing. let's forget it ;)

got exactly the same problem, im using UI for its autocompletion only

jamiegp commented Aug 22, 2012

Hi all,

I have exactly same bug trying to combine UI Autocomplete with 1.2.0 Alpha.

I think I've narrowed it down to a conflict with the "Widget UI Core" component.

jamiegp commented Aug 22, 2012

And now it's fixed. Not sure what changed 1.2.0 Alpha, but if I load autocomplete before jquerymobile, it fixes the issue. Panic over :)

gseguin closed this Aug 22, 2012

jds13 commented Oct 18, 2012

I fixed this by removing jquery.ui.widget.js which was probably required at some time in the distant past:

Member

jaspermdegroot commented Oct 23, 2012

@jds13

It's not that UI doesn't require jquery.ui.widget.js (widget factory) anymore. It's just that it's included - and needed - in Mobile as well. If you load UI before Mobile this is causing a conflict. Note that the version of the widget factory code can be different among both frameworks.

teo1978 referenced this issue Jun 2, 2013

Closed

Uncaught error #6068

teo1978 commented Jul 16, 2013

Though the issue is fixed with the latest jqm together with the latest jui and latest jquery,
the issue still exists with some older versions of Jquery core and jquery UI (still with jqm 1.3.1).

I've experienced it with one (or both) of the following combinations, but I'm not sure which one (if not both):
jqm 1.3.1 + jUI 1.8.22 + jquery 1.7.2
jqm 1.3.1 + jUI 1.8.17 + jquery 1.7.1

I don't have a jsbin (sorry), but on the site where I had the issue with one of the above combinations, I fixed it by just replacing jui and jquery with more recent versions (jui 1.9.2 and jquery 1.8.3) without touching a single line of code.

Confirmed this issue still exists with:
jqm 1.4.0-beta.1 + jQuery UI 1.8.11 + jQuery v1.7.1
jqm 1.3.0 + jQuery UI 1.8.11 + jQuery v1.7.1
jqm 1.2.0 + jQuery UI 1.8.11 + jQuery v1.7.1

digitalStyx referenced this issue in yo35/rpb-chessboard Oct 15, 2015

Open

TypeError: e.widget.extend is not a function #49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment